[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251124175247-mutt-send-email-mst@kernel.org>
Date: Mon, 24 Nov 2025 17:54:17 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Daniel Jurgens <danielj@...dia.com>
Cc: netdev@...r.kernel.org, jasowang@...hat.com, pabeni@...hat.com,
virtualization@...ts.linux.dev, parav@...dia.com,
shshitrit@...dia.com, yohadt@...dia.com, xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com, jgg@...pe.ca, kevin.tian@...el.com,
kuba@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v12 05/12] virtio_net: Query and set flow filter
caps
On Wed, Nov 19, 2025 at 01:15:16PM -0600, Daniel Jurgens wrote:
> index 4738ffe3b5c6..e84a305d2b2a 100644
> --- a/drivers/virtio/virtio_admin_commands.c
> +++ b/drivers/virtio/virtio_admin_commands.c
> @@ -161,6 +161,8 @@ int virtio_admin_obj_destroy(struct virtio_device *vdev,
> err = vdev->config->admin_cmd_exec(vdev, &cmd);
> kfree(data);
>
> + WARN_ON_ONCE(err);
> +
> return err;
> }
The reason I suggested WARN_ON_ONCE is because callers generally can not
handle errors. if you return int you assume callers will do that so then
warning does not make sense.
Bottom line - make this return void.
Powered by blists - more mailing lists