All of lore.kernel.org
 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

* Re: [Qemu-devel] [PATCH] virtio-blk: remove duplicate definition of VirtIOBlock *s pointer
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2019-01-30 10:04 UTC (permalink / raw)
  To: Stefano Garzarella, qemu-devel, qemu-trivial
  Cc: Kevin Wolf, Max Reitz, qemu-block, Stefan Hajnoczi, Michael S. Tsirkin

On 2019-01-30 10:52, Stefano Garzarella wrote:
> 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.
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-blk: remove duplicate definition of VirtIOBlock *s pointer
  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 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2019-01-30 10:16 UTC (permalink / raw)
  To: Stefano Garzarella, qemu-devel, qemu-trivial
  Cc: Kevin Wolf, Max Reitz, qemu-block, Stefan Hajnoczi, Michael S. Tsirkin

On 30/01/2019 10:52, Stefano Garzarella wrote:
> 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.
> 

Applied to my trivial-patches branch.

Thanks,
Laurent

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.