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