Re: [PATCH] hw: virtio-gpu: remove duplicated 'virtqueue_pop'

2020-08-17 Thread Gerd Hoffmann
Hi, > - If the get_next() invocation is simple, then style (1) is perfectly fine. Fully agree. Duplicating a single line is perfectly fine if it is simple enough that you can hardly get it wrong. > - Style (2) is the worst of all. Yes, especially because the break is three lines not two due

Re: [PATCH] hw: virtio-gpu: remove duplicated 'virtqueue_pop'

2020-08-13 Thread Li Qiang
Laszlo Ersek 于2020年8月14日周五 上午4:21写道: > > On 08/13/20 17:36, Li Qiang wrote: > > Just use 'while (true)' to avoid duplicated. > > No function change. > > > > Signed-off-by: Li Qiang > > --- > > hw/display/virtio-gpu.c | 8 +--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff

Re: [PATCH] hw: virtio-gpu: remove duplicated 'virtqueue_pop'

2020-08-13 Thread Laszlo Ersek
On 08/13/20 17:36, Li Qiang wrote: > Just use 'while (true)' to avoid duplicated. > No function change. > > Signed-off-by: Li Qiang > --- > hw/display/virtio-gpu.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c

[PATCH] hw: virtio-gpu: remove duplicated 'virtqueue_pop'

2020-08-13 Thread Li Qiang
Just use 'while (true)' to avoid duplicated. No function change. Signed-off-by: Li Qiang --- hw/display/virtio-gpu.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 5f0dd7c150..9cef313f5e 100644 --- a/hw/display/