From: "Michael S. Tsirkin" <mst@redhat.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] vdpasim: remove unused variable 'ret'
Date: Tue, 5 May 2020 20:35:58 -0400 [thread overview]
Message-ID: <20200505203544-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200410115422.42308-1-yuehaibing@huawei.com>
On Fri, Apr 10, 2020 at 07:54:22PM +0800, YueHaibing wrote:
> drivers/vdpa/vdpa_sim/vdpa_sim.c:92:6: warning:
> variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
Either this, or BUG_ON. Jason?
> drivers/vdpa/vdpa_sim/vdpa_sim.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 7957d2d41fc4..01c456f7c1f7 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev)
> static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
> {
> struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
> - int ret;
>
> - ret = vringh_init_iotlb(&vq->vring, vdpasim_features,
> - VDPASIM_QUEUE_MAX, false,
> - (struct vring_desc *)(uintptr_t)vq->desc_addr,
> - (struct vring_avail *)
> - (uintptr_t)vq->driver_addr,
> - (struct vring_used *)
> - (uintptr_t)vq->device_addr);
> + vringh_init_iotlb(&vq->vring, vdpasim_features,
> + VDPASIM_QUEUE_MAX, false,
> + (struct vring_desc *)(uintptr_t)vq->desc_addr,
> + (struct vring_avail *)
> + (uintptr_t)vq->driver_addr,
> + (struct vring_used *)
> + (uintptr_t)vq->device_addr);
> }
>
> static void vdpasim_vq_reset(struct vdpasim_virtqueue *vq)
> --
> 2.17.1
>
next prev parent reply other threads:[~2020-05-06 0:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 11:54 [PATCH -next] vdpasim: remove unused variable 'ret' YueHaibing
2020-04-10 11:54 ` YueHaibing
2020-05-06 0:35 ` Michael S. Tsirkin [this message]
2020-05-08 6:57 ` Jason Wang
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=20200505203544-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=yuehaibing@huawei.com \
/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.