All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: remove dead variable in virtio_blk_handle_scsi
Date: Wed, 13 Jan 2010 17:27:35 -0600	[thread overview]
Message-ID: <4B4E56E7.4050102@codemonkey.ws> (raw)
In-Reply-To: <20100113123032.GA5728@lst.de>

On 01/13/2010 06:30 AM, Christoph Hellwig wrote:
> As pointed out by clang size is only ever written to, but never actually
> used.
>
> Signed-off-by: Christoph Hellwig<hch@lst.de>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> Index: qemu/hw/virtio-blk.c
> ===================================================================
> --- qemu.orig/hw/virtio-blk.c	2010-01-13 13:25:00.911004071 +0100
> +++ qemu/hw/virtio-blk.c	2010-01-13 13:25:17.014006323 +0100
> @@ -165,7 +165,7 @@ static VirtIOBlockReq *virtio_blk_get_re
>   static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
>   {
>       struct sg_io_hdr hdr;
> -    int ret, size = 0;
> +    int ret;
>       int status;
>       int i;
>
> @@ -194,7 +194,6 @@ static void virtio_blk_handle_scsi(VirtI
>        * before the regular inhdr.
>        */
>       req->scsi = (void *)req->elem.in_sg[req->elem.in_num - 2].iov_base;
> -    size = sizeof(*req->in) + sizeof(*req->scsi);
>
>       memset(&hdr, 0, sizeof(struct sg_io_hdr));
>       hdr.interface_id = 'S';
> @@ -226,7 +225,6 @@ static void virtio_blk_handle_scsi(VirtI
>               hdr.dxfer_len += req->elem.in_sg[i].iov_len;
>
>           hdr.dxferp = req->elem.in_sg;
> -        size += hdr.dxfer_len;
>       } else {
>           /*
>            * Some SCSI commands don't actually transfer any data.
> @@ -236,7 +234,6 @@ static void virtio_blk_handle_scsi(VirtI
>
>       hdr.sbp = req->elem.in_sg[req->elem.in_num - 3].iov_base;
>       hdr.mx_sb_len = req->elem.in_sg[req->elem.in_num - 3].iov_len;
> -    size += hdr.mx_sb_len;
>
>       ret = bdrv_ioctl(req->dev->bs, SG_IO,&hdr);
>       if (ret) {
>
>
>
>    

      reply	other threads:[~2010-01-13 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 12:30 [Qemu-devel] [PATCH] virtio-blk: remove dead variable in virtio_blk_handle_scsi Christoph Hellwig
2010-01-13 23:27 ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4E56E7.4050102@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.