From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOzhy-00014Q-SO for qemu-devel@nongnu.org; Sun, 17 Jul 2016 23:59:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOzhx-0007HA-1u for qemu-devel@nongnu.org; Sun, 17 Jul 2016 23:59:05 -0400 From: Cao jin Date: Mon, 18 Jul 2016 12:05:49 +0800 Message-ID: <1468814749-14510-1-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] virtio-blk: dataplane cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , Max Reitz No need duplicate the judgment, there is one in function entry. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: Max Reitz Signed-off-by: Cao jin --- hw/block/dataplane/virtio-blk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 54b9ac1..704a763 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -112,10 +112,8 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf, s->vdev = vdev; s->conf = conf; - if (conf->iothread) { - s->iothread = conf->iothread; - object_ref(OBJECT(s->iothread)); - } + s->iothread = conf->iothread; + object_ref(OBJECT(s->iothread)); s->ctx = iothread_get_aio_context(s->iothread); s->bh = aio_bh_new(s->ctx, notify_guest_bh, s); s->batch_notify_vqs = bitmap_new(conf->num_queues); -- 2.1.0