All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-23  8:43 ` Jiapeng Chong
  0 siblings, 0 replies; 10+ messages in thread
From: Jiapeng Chong @ 2022-06-23  8:43 UTC (permalink / raw)
  To: neal_liu
  Cc: balbi, gregkh, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig, 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.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/usb/gadget/udc/aspeed_udc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c
index 1fc15228ff15..387a7abdcee4 100644
--- a/drivers/usb/gadget/udc/aspeed_udc.c
+++ b/drivers/usb/gadget/udc/aspeed_udc.c
@@ -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",
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-23  8:43 ` Jiapeng Chong
  0 siblings, 0 replies; 10+ messages in thread
From: Jiapeng Chong @ 2022-06-23  8:43 UTC (permalink / raw)
  To: neal_liu
  Cc: balbi, linux-aspeed, Jiapeng Chong, andrew, gregkh, linux-usb,
	linux-kernel, dri-devel, sumit.semwal, linaro-mm-sig, joel,
	christian.koenig, linux-arm-kernel, linux-media

This was found by coccicheck:

./drivers/usb/gadget/udc/aspeed_udc.c:496:8-13: WARNING: Unsigned expression compared with zero: chunk >= 0.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/usb/gadget/udc/aspeed_udc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c
index 1fc15228ff15..387a7abdcee4 100644
--- a/drivers/usb/gadget/udc/aspeed_udc.c
+++ b/drivers/usb/gadget/udc/aspeed_udc.c
@@ -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",
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-23  8:43 ` Jiapeng Chong
  0 siblings, 0 replies; 10+ messages in thread
From: Jiapeng Chong @ 2022-06-23  8:43 UTC (permalink / raw)
  To: neal_liu
  Cc: balbi, gregkh, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig, 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.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/usb/gadget/udc/aspeed_udc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c
index 1fc15228ff15..387a7abdcee4 100644
--- a/drivers/usb/gadget/udc/aspeed_udc.c
+++ b/drivers/usb/gadget/udc/aspeed_udc.c
@@ -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",
-- 
2.20.1.7.g153144c


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] usb: gadget: Fix unsigned comparison with less than zero
  2022-06-23  8:43 ` Jiapeng Chong
  (?)
@ 2022-06-24 11:42   ` Greg KH
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-24 11:42 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: neal_liu, balbi, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig

On Thu, Jun 23, 2022 at 04:43:47PM +0800, Jiapeng Chong wrote:
> 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.

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

What commit does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-24 11:42   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-24 11:42 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: balbi, linux-aspeed, andrew, neal_liu, linux-usb, linux-kernel,
	dri-devel, sumit.semwal, linaro-mm-sig, joel, christian.koenig,
	linux-arm-kernel, linux-media

On Thu, Jun 23, 2022 at 04:43:47PM +0800, Jiapeng Chong wrote:
> 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.

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

What commit does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-24 11:42   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-24 11:42 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: neal_liu, balbi, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig

On Thu, Jun 23, 2022 at 04:43:47PM +0800, Jiapeng Chong wrote:
> 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.

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

What commit does this fix?

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* 回复:[PATCH] usb: gadget: Fix unsigned comparison with less than zero
  2022-06-24 11:42   ` Greg KH
  (?)
  (?)
@ 2022-06-29  5:51   ` Jiapeng.Chong
  2022-06-29  5:59       ` Greg KH
  -1 siblings, 1 reply; 10+ messages in thread
From: Jiapeng.Chong @ 2022-06-29  5:51 UTC (permalink / raw)
  To: Greg KH
  Cc: balbi, linux-aspeed, andrew, neal_liu, linux-usb, linux-kernel,
	dri-devel, sumit.semwal, linaro-mm-sig, joel, christian.koenig,
	linux-arm-kernel, linux-media

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Sorry, we didn't see this patch.
commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e

------------------------------------------------------------------
发件人:Greg KH <gregkh@linuxfoundation.org>
发送时间:2022年6月24日(星期五) 19:45
收件人:Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
抄 送:neal_liu <neal_liu@aspeedtech.com>; balbi <balbi@kernel.org>; joel <joel@jms.id.au>; andrew <andrew@aj.id.au>; sumit.semwal <sumit.semwal@linaro.org>; christian.koenig <christian.koenig@amd.com>; linux-aspeed <linux-aspeed@lists.ozlabs.org>; linux-usb <linux-usb@vger.kernel.org>; linux-arm-kernel <linux-arm-kernel@lists.infradead.org>; linux-kernel <linux-kernel@vger.kernel.org>; linux-media <linux-media@vger.kernel.org>; dri-devel <dri-devel@lists.freedesktop.org>; linaro-mm-sig <linaro-mm-sig@lists.linaro.org>
主 题:Re: [PATCH] usb: gadget: Fix unsigned comparison with less than zero

On Thu, Jun 23, 2022 at 04:43:47PM +0800, Jiapeng Chong wrote:
> 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.

> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

What commit does this fix?

thanks,

greg k-h


[-- Attachment #2: Type: text/html, Size: 4176 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 回复:[PATCH] usb: gadget: Fix unsigned comparison with less than zero
  2022-06-29  5:51   ` 回复:[PATCH] " Jiapeng.Chong
  2022-06-29  5:59       ` Greg KH
@ 2022-06-29  5:59       ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-29  5:59 UTC (permalink / raw)
  To: Jiapeng.Chong
  Cc: neal_liu, balbi, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig

On Wed, Jun 29, 2022 at 01:51:01PM +0800, Jiapeng.Chong wrote:
> Sorry, we didn't see this patch.
> commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e

I am sorry, I do not understand what you mean here at all.

confused,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 回复:[PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-29  5:59       ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-29  5:59 UTC (permalink / raw)
  To: Jiapeng.Chong
  Cc: balbi, linux-aspeed, andrew, neal_liu, linux-usb, linux-kernel,
	dri-devel, sumit.semwal, linaro-mm-sig, joel, christian.koenig,
	linux-arm-kernel, linux-media

On Wed, Jun 29, 2022 at 01:51:01PM +0800, Jiapeng.Chong wrote:
> Sorry, we didn't see this patch.
> commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e

I am sorry, I do not understand what you mean here at all.

confused,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 回复:[PATCH] usb: gadget: Fix unsigned comparison with less than zero
@ 2022-06-29  5:59       ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2022-06-29  5:59 UTC (permalink / raw)
  To: Jiapeng.Chong
  Cc: neal_liu, balbi, joel, andrew, sumit.semwal, christian.koenig,
	linux-aspeed, linux-usb, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig

On Wed, Jun 29, 2022 at 01:51:01PM +0800, Jiapeng.Chong wrote:
> Sorry, we didn't see this patch.
> commit c09b1f372e746aeeb61ef8ffe0fea3970fd9273e

I am sorry, I do not understand what you mean here at all.

confused,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-29  6:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23  8:43 [PATCH] usb: gadget: Fix unsigned comparison with less than zero Jiapeng Chong
2022-06-23  8:43 ` Jiapeng Chong
2022-06-23  8:43 ` Jiapeng Chong
2022-06-24 11:42 ` Greg KH
2022-06-24 11:42   ` Greg KH
2022-06-24 11:42   ` Greg KH
2022-06-29  5:51   ` 回复:[PATCH] " Jiapeng.Chong
2022-06-29  5:59     ` Greg KH
2022-06-29  5:59       ` Greg KH
2022-06-29  5:59       ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.