From: sashiko-bot@kernel.org
To: "Shunbo Shi" <shishunbo@cmss.chinamobile.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH 14/22] usb: misc: fix a few spelling mistakes in comments
Date: Tue, 10 Nov 2026 06:45:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-206442@kernel.org> (raw)
In-Reply-To: <20261110064105.20335-15-shishunbo@cmss.chinamobile.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] usb: misc: emi26: infinite loop in emi26_load_firmware() [1]
--
commit dcf01fbf19632d3a153a43eecd101490f0323a24
Author: Shunbo Shi <shishunbo@cmss.chinamobile.com>
usb: misc: fix a few spelling mistakes in comments
This commit fixes spelling mistakes in comments in the emi26, emi62, and
ldusb drivers.
> diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
> index 24d841850e056..a0fd800820438 100644
> --- a/drivers/usb/misc/emi26.c
> +++ b/drivers/usb/misc/emi26.c
> @@ -198,7 +198,7 @@ static int emi26_load_firmware (struct usb_device *dev)
> goto wraperr;
> msleep(250); /* let device settle */
>
> - /* return 1 to fail the driver inialization
> + /* return 1 to fail the driver initialization
> * and give real driver change to load */
> err = 1;
>
> diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
> index 3eea60437f567..d29b5312f6270 100644
> --- a/drivers/usb/misc/emi62.c
> +++ b/drivers/usb/misc/emi62.c
> @@ -211,7 +211,7 @@ static int emi62_load_firmware (struct usb_device *dev)
>
> kfree(buf);
>
> - /* return 1 to fail the driver inialization
> + /* return 1 to fail the driver initialization
> * and give real driver change to load */
> return 1;
[Severity: High]
This problem wasn't introduced by this patch, but can emi26_load_firmware()
and emi62_load_firmware() enter an infinite loop [1] if a bitstream_fw
ihex record has a length of at least FW_LOAD_SIZE (1023)?
drivers/usb/misc/emi26.c:emi26_load_firmware() {
...
rec = (const struct ihex_binrec *)bitstream_fw->data;
do {
i = 0;
addr = be32_to_cpu(rec->addr);
/* intel hex records are terminated with type 0 element */
while (rec && (i + be16_to_cpu(rec->len) < FW_LOAD_SIZE)) {
memcpy(buf + i, rec->data, be16_to_cpu(rec->len));
i += be16_to_cpu(rec->len);
rec = ihex_next_binrec(rec);
}
err = emi26_writememory(dev, addr, buf, i, ANCHOR_LOAD_FPGA);
if (err < 0)
goto wraperr;
} while (rec);
...
}
When be16_to_cpu(rec->len) >= FW_LOAD_SIZE, the inner while loop does not
execute even with i == 0 and leaves rec unchanged, so the outer do-while
loop repeatedly issues a 0-byte write and spins forever during probe.
[1] https://sashiko.dev/#/bug/linux-c69bd064-7969-4899-86f0-dc199358fd96
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110064105.20335-1-shishunbo@cmss.chinamobile.com?part=14
next prev parent reply other threads:[~2026-11-10 6:45 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 6:40 [PATCH 00/22] usb: fix spelling mistakes in comments Shunbo Shi
2026-11-10 6:40 ` [PATCH 01/22] usb: atm: fix a few " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 02/22] usb: cdns3: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 03/22] usb: chipidea: " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 04/22] usb: class: " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 05/22] usb: common: " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 06/22] usb: core: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 07/22] usb: dwc2: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 08/22] usb: dwc3: " Shunbo Shi
2026-11-10 6:48 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 09/22] usb: fotg210: " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 10/22] usb: gadget: " Shunbo Shi
2026-11-10 6:49 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 11/22] usb: host: " Shunbo Shi
2026-11-10 6:45 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 12/22] usb: image: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 13/22] usb: isp1760: " Shunbo Shi
2026-11-10 6:43 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 14/22] usb: misc: " Shunbo Shi
2026-11-10 6:45 ` sashiko-bot [this message]
2026-11-10 6:40 ` [PATCH 15/22] usb: musb: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:40 ` [PATCH 16/22] usb: phy: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 17/22] usb: renesas_usbhs: " Shunbo Shi
2026-11-10 6:45 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 18/22] usb: roles: " Shunbo Shi
2026-11-10 6:45 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 19/22] usb: serial: " Shunbo Shi
2026-11-10 6:45 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 20/22] usb: storage: " Shunbo Shi
2026-11-10 6:44 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 21/22] usb: typec: " Shunbo Shi
2026-11-10 6:46 ` sashiko-bot
2026-11-10 6:41 ` [PATCH 22/22] usb: usbip: " Shunbo Shi
2026-11-10 6:46 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 00/22] usb: fix " Shunbo Shi
2026-11-10 7:58 ` [PATCH v2 01/22] usb: atm: fix a few " Shunbo Shi
2026-11-10 23:29 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 02/22] usb: cdns3: " Shunbo Shi
2026-11-10 23:29 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 03/22] usb: chipidea: " Shunbo Shi
2026-11-10 23:29 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 04/22] usb: class: " Shunbo Shi
2026-11-10 23:30 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 05/22] usb: common: " Shunbo Shi
2026-11-10 23:30 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 06/22] usb: core: " Shunbo Shi
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 07/22] usb: dwc2: " Shunbo Shi
2026-11-10 23:31 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 08/22] usb: dwc3: " Shunbo Shi
2026-11-10 23:31 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 09/22] usb: fotg210: " Shunbo Shi
2026-11-10 23:31 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 10/22] usb: gadget: " Shunbo Shi
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 11/22] usb: host: " Shunbo Shi
2026-11-10 8:45 ` Michal Pecio
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 12/22] usb: image: " Shunbo Shi
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 13/22] usb: isp1760: " Shunbo Shi
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 14/22] usb: misc: " Shunbo Shi
2026-11-10 23:33 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 15/22] usb: musb: " Shunbo Shi
2026-11-10 23:32 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 16/22] usb: phy: " Shunbo Shi
2026-11-10 23:33 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 17/22] usb: renesas_usbhs: " Shunbo Shi
2026-11-10 23:33 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 18/22] usb: roles: " Shunbo Shi
2026-11-10 23:34 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 19/22] usb: serial: " Shunbo Shi
2026-11-10 23:33 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 20/22] usb: storage: " Shunbo Shi
2026-11-10 23:33 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 21/22] usb: typec: " Shunbo Shi
2026-11-10 23:34 ` sashiko-bot
2026-11-10 7:58 ` [PATCH v2 22/22] usb: usbip: " Shunbo Shi
2026-11-10 23:34 ` sashiko-bot
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=sashiko-outbox-206442@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shishunbo@cmss.chinamobile.com \
/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