Re: [PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Alan Stern
On Thu, May 14, 2020 at 04:05:00PM +0800, Macpaul Lin wrote: > This issue has been reported by coverity scanner. > Replace "int portnum" by "unsigned int", this void negative index at > array. Can you please explain this more fully? Why does coverity think the code might use a negative array ind

Re: [PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Felipe Balbi
Macpaul Lin writes: > This issue has been reported by coverity scanner. > Replace "int portnum" by "unsigned int", this void negative index at > array. > > Signed-off-by: Stan Lu > Signed-off-by: Macpaul Lin please rebase on testing/fixes error: patch failed: drivers/usb/gadget/function/u_ser

[PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Macpaul Lin
This issue has been reported by coverity scanner. Replace "int portnum" by "unsigned int", this void negative index at array. Signed-off-by: Stan Lu Signed-off-by: Macpaul Lin --- drivers/usb/gadget/function/u_serial.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d