Re: [Qemu-devel] [PATCH v2] usb: fix unbounded stack warning for xhci_dma_write_u32s

2016-03-19 Thread Gerd Hoffmann
On Fr, 2016-03-11 at 09:51 +0800, Peter Xu wrote: > All the callers for xhci_dma_write_u32s() are using mostly 5 * uint32_t > in len. To avoid unbound stack warning for the function, make it > statically allocated, and assert when it's not big enough in the > future. Added to usb queue. thanks,

[Qemu-devel] [PATCH v2] usb: fix unbounded stack warning for xhci_dma_write_u32s

2016-03-10 Thread Peter Xu
All the callers for xhci_dma_write_u32s() are using mostly 5 * uint32_t in len. To avoid unbound stack warning for the function, make it statically allocated, and assert when it's not big enough in the future. Signed-off-by: Peter Xu --- hw/usb/hcd-xhci.c | 6 -- 1 file changed, 4 insertions