Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-15 Thread Michael S. Tsirkin
On Wed, May 15, 2024 at 04:50:48PM +0200, Dan Carpenter wrote: > On Sun, May 12, 2024 at 12:01:55PM -0400, Michael S. Tsirkin wrote: > > On Fri, May 10, 2024 at 03:50:45PM +0300, Dan Carpenter wrote: > > > The virtnet_send_command_reply() function returns true on success or > > > false on failure.

Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-15 Thread Dan Carpenter
On Sun, May 12, 2024 at 12:01:55PM -0400, Michael S. Tsirkin wrote: > On Fri, May 10, 2024 at 03:50:45PM +0300, Dan Carpenter wrote: > > The virtnet_send_command_reply() function returns true on success or > > false on failure. The "ok" variable is true/false depending on whether > > it succeeds

Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-12 Thread Xuan Zhuo
On Fri, 10 May 2024 15:50:45 +0300, Dan Carpenter wrote: > The virtnet_send_command_reply() function returns true on success or > false on failure. The "ok" variable is true/false depending on whether > it succeeds or not. It's up to the caller to translate the true/false > into -EINVAL on

Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-12 Thread Michael S. Tsirkin
On Fri, May 10, 2024 at 03:50:45PM +0300, Dan Carpenter wrote: > The virtnet_send_command_reply() function returns true on success or > false on failure. The "ok" variable is true/false depending on whether > it succeeds or not. It's up to the caller to translate the true/false > into -EINVAL on

Re: [PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-11 Thread Simon Horman
On Fri, May 10, 2024 at 03:50:45PM +0300, Dan Carpenter wrote: > The virtnet_send_command_reply() function returns true on success or > false on failure. The "ok" variable is true/false depending on whether > it succeeds or not. It's up to the caller to translate the true/false > into -EINVAL on

[PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-10 Thread Dan Carpenter
The virtnet_send_command_reply() function returns true on success or false on failure. The "ok" variable is true/false depending on whether it succeeds or not. It's up to the caller to translate the true/false into -EINVAL on failure or zero for success. The bug is that __virtnet_get_hw_stats()