usb: gadget: Fix unsigned comparison with less than zero
Subsystems (4)
PATCH 1/1 usb: gadget: Fix unsigned comparison with less than zero
This was found by coccicheck:
./drivers/usb/gadget/udc/aspeed_udc.c:496:8-13: WARNING: Unsigned expression compared with zero: chunk >= 0.
--- drivers/usb/gadget/udc/aspeed_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/aspeed_udc.c +2 -2
@@ -476,8 +476,8 @@ static int ast_dma_descriptor_setup(struct ast_udc_ep *ep, u32 dma_buf, {struct ast_udc_dev *udc = ep->udc;struct device *dev = &udc->pdev->dev; -u32 offset, chunk; -int count, last; +u32 offset; +int count, last, chunk;if (!ep->descs) { dev_warn(dev, "%s: Empty DMA descs list failure\n",
Signature · 1 line
2.20.1.7.g153144c
Greg KH
maintainerQuoted 3 lines · Jiapeng Chong
This was found by coccicheck:
./drivers/usb/gadget/udc/aspeed_udc.c:496:8-13: WARNING: Unsigned expression compared with zero: chunk >= 0.
What does this mean? Where is the error?
Please explain the reason for changes, not just the output of a random tool that you ran on the code.
Quoted 1 line
Signed-off-by Jiapeng Chong <[email protected]>
What commit does this fix?
thanks,
greg k-h
Sorry, we didn't see this patch.
commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e
------------------------------------------------------------------
????Greg KH <[email protected]>
?????2022?6?24?(???) 19:45
????Jiapeng Chong <[email protected]>
????neal_liu <[email protected]>; balbi <[email protected]>; joel <[email protected]>; andrew <[email protected]>; sumit.semwal <[email protected]>; christian.koenig <[email protected]>; linux-aspeed <[email protected]>; linux-usb <[email protected]>; linux-arm-kernel <[email protected]>; linux-kernel <[email protected]>; linux-media <[email protected]>; dri-devel <[email protected]>; linaro-mm-sig <[email protected]> ????Re: [PATCH] usb: gadget: Fix unsigned comparison with less than zero
Quoted 3 lines · Jiapeng Chong
This was found by coccicheck:
./drivers/usb/gadget/udc/aspeed_udc.c:496:8-13: WARNING: Unsigned expression compared with zero: chunk >= 0.
What does this mean? Where is the error?
Please explain the reason for changes, not just the output of a random tool that you ran on the code.
Quoted 1 line
Signed-off-by Jiapeng Chong <[email protected]>
What commit does this fix?
thanks,
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20220629/cb6bd167/attachment-0001.htm>
Greg KH
maintainerQuoted 2 lines · Jiapeng.Chong
Sorry, we didn't see this patch.
commitc09b1f372e746aeeb61ef8ffe0fea3970fd9273e
I am sorry, I do not understand what you mean here at all.
confused,
greg k-h