Re: [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-08 Thread Feng Liu via Virtualization
On 2023-03-08 a.m.9:23, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Tue, Mar 07, 2023 at 05:57:03AM +0200, Feng Liu wrote: is_power_of_2() already performs the zero check. Hence avoid duplicate check. While at it, move the query of size check also a

Re: [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-08 Thread Michael S. Tsirkin
On Tue, Mar 07, 2023 at 05:57:03AM +0200, Feng Liu wrote: > is_power_of_2() already performs the zero check. Hence avoid duplicate > check. While at it, move the query of size check also adjacent to where > its used for the disabled vq. > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko > Rev

Re: [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-07 Thread Michael S. Tsirkin
On Wed, Mar 08, 2023 at 01:52:43PM +0800, Jason Wang wrote: > On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote: > > > > is_power_of_2() already performs the zero check. Hence avoid duplicate > > check. While at it, move the query of size check also adjacent to where > > its used for the disabled vq.

Re: [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-07 Thread Jason Wang
On Tue, Mar 7, 2023 at 11:57 AM Feng Liu wrote: > > is_power_of_2() already performs the zero check. Hence avoid duplicate > check. While at it, move the query of size check also adjacent to where > its used for the disabled vq. > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko > Reviewed-by

Re: [PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-07 Thread David Edmondson
Feng Liu via Virtualization writes: > is_power_of_2() already performs the zero check. Hence avoid duplicate > check. While at it, move the query of size check also adjacent to where > its used for the disabled vq. > > Signed-off-by: Feng Liu > Reviewed-by: Jiri Pirko > Reviewed-by: Parav Pandi

[PATCH 1/3] virtio_pci_modern: Remove unnecessary num zero check

2023-03-06 Thread Feng Liu via Virtualization
is_power_of_2() already performs the zero check. Hence avoid duplicate check. While at it, move the query of size check also adjacent to where its used for the disabled vq. Signed-off-by: Feng Liu Reviewed-by: Jiri Pirko Reviewed-by: Parav Pandit Reviewed-by: Gavin Li Reviewed-by: Bodong Wang