Re: [Qemu-devel] [PATCH] input: avoid malloc for mouse events

2018-12-14 Thread Philippe Mathieu-Daudé
On 12/10/18 3:08 PM, Gerd Hoffmann wrote: > There is no reason to allocate mouse events using malloc, we can > allcoate them from stack instead, save a few cpu cycles and make the > code more readable with c99 initializers. Good idea. > > Suggested-by: FelixYao > Signed-off-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH] input: avoid malloc for mouse events

2018-12-13 Thread Markus Armbruster
Gerd Hoffmann writes: > There is no reason to allocate mouse events using malloc, we can > allcoate them from stack instead, save a few cpu cycles and make the > code more readable with c99 initializers. > > Suggested-by: FelixYao > Signed-off-by: Gerd Hoffmann Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH] input: avoid malloc for mouse events

2018-12-10 Thread Gerd Hoffmann
There is no reason to allocate mouse events using malloc, we can allcoate them from stack instead, save a few cpu cycles and make the code more readable with c99 initializers. Suggested-by: FelixYao Signed-off-by: Gerd Hoffmann --- include/ui/input.h | 3 --- ui/input.c | 68