From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: eperezma@redhat.com, jasowang@redhat.com,
xuanzhuo@linux.alibaba.com, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio_vdpa: fix misleading return in void function
Date: Fri, 3 Oct 2025 07:08:01 -0400 [thread overview]
Message-ID: <20251003070729-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20251001191653.1713923-1-alok.a.tiwari@oracle.com>
On Wed, Oct 01, 2025 at 12:16:50PM -0700, Alok Tiwari wrote:
> virtio_vdpa_set_status() is declared as returning void, but it used
> "return vdpa_set_status()" Since vdpa_set_status() also returns
> void, the return statement is unnecessary and misleading.
> Remove it.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Fixes: c043b4a8cf3b ("virtio: introduce a vDPA based transport")
> ---
> drivers/virtio/virtio_vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
> index 657b07a60788..1abecaf76465 100644
> --- a/drivers/virtio/virtio_vdpa.c
> +++ b/drivers/virtio/virtio_vdpa.c
> @@ -80,7 +80,7 @@ static void virtio_vdpa_set_status(struct virtio_device *vdev, u8 status)
> {
> struct vdpa_device *vdpa = vd_get_vdpa(vdev);
>
> - return vdpa_set_status(vdpa, status);
> + vdpa_set_status(vdpa, status);
> }
>
> static void virtio_vdpa_reset(struct virtio_device *vdev)
> --
> 2.50.1
prev parent reply other threads:[~2025-10-03 11:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 19:16 [PATCH] virtio_vdpa: fix misleading return in void function Alok Tiwari
2025-10-03 11:08 ` Michael S. Tsirkin [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=20251003070729-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alok.a.tiwari@oracle.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox