qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-blk: remove duplicate definition of VirtIOBlock *s pointer
@ 2019-01-30  9:52 Stefano Garzarella
  2019-01-30 10:04 ` Thomas Huth
  2019-01-30 10:16 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Garzarella @ 2019-01-30  9:52 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial
  Cc: Kevin Wolf, Michael S. Tsirkin, Max Reitz, Stefan Hajnoczi,
	qemu-block

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>
---
 hw/block/virtio-blk.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index f208c6ddb9..9a87b3bfac 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -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.
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-30 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-30  9:52 [Qemu-devel] [PATCH] virtio-blk: remove duplicate definition of VirtIOBlock *s pointer Stefano Garzarella
2019-01-30 10:04 ` Thomas Huth
2019-01-30 10:16 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).