* [PATCH] virtio_vdpa: fix misleading return in void function
@ 2025-10-01 19:16 Alok Tiwari
2025-10-03 11:08 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Alok Tiwari @ 2025-10-01 19:16 UTC (permalink / raw)
To: eperezma, mst, jasowang, xuanzhuo, virtualization
Cc: alok.a.tiwari, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio_vdpa: fix misleading return in void function
2025-10-01 19:16 [PATCH] virtio_vdpa: fix misleading return in void function Alok Tiwari
@ 2025-10-03 11:08 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2025-10-03 11:08 UTC (permalink / raw)
To: Alok Tiwari; +Cc: eperezma, jasowang, xuanzhuo, virtualization, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-03 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).