From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: neal_liu@aspeedtech.com
Cc: balbi@kernel.org, gregkh@linuxfoundation.org, joel@jms.id.au,
andrew@aj.id.au, sumit.semwal@linaro.org,
christian.koenig@amd.com, linux-aspeed@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [PATCH] usb: gadget: Fix unsigned comparison with less than zero
Date: Thu, 23 Jun 2022 16:43:47 +0800 [thread overview]
Message-ID: <20220623084347.38207-1-jiapeng.chong@linux.alibaba.com> (raw)
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
next reply other threads:[~2022-06-23 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 8:43 Jiapeng Chong [this message]
2022-06-24 11:42 ` Greg KH
[not found] ` <19ba5da7-3e9d-49e1-aa7f-b0834737fbfe.jiapeng.chong@linux.alibaba.com>
2022-06-29 5:59 ` 回复:[PATCH] " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220623084347.38207-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=andrew@aj.id.au \
--cc=balbi@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neal_liu@aspeedtech.com \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®