]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
virtio-blk: remove duplicate definition of VirtIOBlock *s pointer
authorStefano Garzarella <sgarzare@redhat.com>
Wed, 30 Jan 2019 09:52:31 +0000 (10:52 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 30 Jan 2019 13:20:18 +0000 (14:20 +0100)
VirtIOBlock *s is already defined and initialized with req->dev
on top of virtio_blk_handle_request(), so we can remove it from
the code block of VIRTIO_BLK_T_GET_ID case.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190130095231.42081-1-sgarzare@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/block/virtio-blk.c

index f208c6ddb93488e809bd88d7fac4f8107f9bd6e1..9a87b3bfac269c7b506bca98662c1815c24fc49a 100644 (file)
@@ -569,8 +569,6 @@ static int virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
         break;
     case VIRTIO_BLK_T_GET_ID:
     {
-        VirtIOBlock *s = req->dev;
-
         /*
          * NB: per existing s/n string convention the string is
          * terminated by '\0' only when shorter than buffer.