summary refs log tree commit diff stats
path: root/scripts/qapi/types.py
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>2018-03-27 10:08:46 -0300
committerKevin Wolf <kwolf@redhat.com>2018-05-15 16:11:41 +0200
commit7803696d8557e02441a2781a19d4008b2f50925c (patch)
tree1964c0454cdf0d8eab0690a40b10f5e839d4d862 /scripts/qapi/types.py
parentad1b4ec39caa5b3f17cbd8160283a03a3dcfe2ae (diff)
downloadfocaccia-qemu-7803696d8557e02441a2781a19d4008b2f50925c.tar.gz
focaccia-qemu-7803696d8557e02441a2781a19d4008b2f50925c.zip
block-backend: simplify blk_get_aio_context
blk_get_aio_context verifies if BlockDriverState bs is not NULL,
return bdrv_get_aio_context(bs) if true or qemu_get_aio_context()
otherwise. However, bdrv_get_aio_context from block.c already does
this verification itself, also returning qemu_get_aio_context()
if bs is NULL:

AioContext *bdrv_get_aio_context(BlockDriverState *bs)
{
    return bs ? bs->aio_context : qemu_get_aio_context();
}

This patch simplifies blk_get_aio_context to simply call
bdrv_get_aio_context instead of replicating the same logic.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi/types.py')
0 files changed, 0 insertions, 0 deletions