qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/block/virtio-blk: Clean req->dev repetitions


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] hw/block/virtio-blk: Clean req->dev repetitions
Date: Thu, 7 Mar 2019 10:18:02 +0000
User-agent: Mutt/1.11.3 (2019-02-01)

On Wed, Mar 06, 2019 at 07:00:25PM +0200, Anastasiia Rusakova wrote:
> @@ -260,9 +260,10 @@ static int virtio_blk_handle_scsi_req(VirtIOBlockReq 
> *req)
>  {
>      int status = VIRTIO_BLK_S_OK;
>      struct virtio_scsi_inhdr *scsi = NULL;
> -    VirtIODevice *vdev = VIRTIO_DEVICE(req->dev);
> +    VirtIOBlock *s = req->dev;
> +    VirtIODevice *vdev = VIRTIO_DEVICE(s);
>      VirtQueueElement *elem = &req->elem;
> -    VirtIOBlock *blk = req->dev;
> +    VirtIOBlock *blk = s;

Hi Anastasiia,
Thanks for the patch!

This function calls it 'blk' instead of 's'.  's' can be eliminated by
reordering the variable definitions:

  VirtIOBlock *blk = req->dev;
  VirtIODevice *vdev = VIRTIO_DEVICE(blk);

The rest looks good to me.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]