From: netdev-bot+sashiko@kernel.org
To: mkl@pengutronix.de
Cc: mailhol@kernel.org, pfink@christ-es.de, eric@evenchick.com,
max@schneidersoft.net, wg@grandegger.com, kernel@pengutronix.de,
linux-can@vger.kernel.org, stable@vger.kernel.org,
kuba@kernel.org
Subject: Re: [PATCH can-next v10 08/14] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info() to print re-submit info messages
Date: Tue, 24 Nov 2026 09:30:58 +0000 [thread overview]
Message-ID: <179551265819.3131.8321640293465934935@kernel.org> (raw)
In-Reply-To: <20261122-gs_usb-fixes-v10-8-7c165c35d04a@pengutronix.de>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit fixes a defect that a specific earlier commit
introduced, but it has no Fixes: tag.
- [Low] The commit message does not match the code.
--
can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info() to print re-submit info messages
This commit changes the IN URB re-submit failure path in
gs_usb_receive_bulk_callback() to use dev_info_ratelimited() on the
parent USB device instead of netdev_info(). With this change the message
names the affected device even when no network device has been
identified yet. It also drops the NULL initializer of the local netdev
variable.
Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260729102802.505168-1-mkl@pengutronix.de
> diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
> index 308daa2645ada..75adec495e657 100644
> --- a/drivers/net/can/usb/gs_usb.c
> +++ b/drivers/net/can/usb/gs_usb.c
[ ... ]
> @@ -819,9 +819,10 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
> if (parent->canch[rc])
> netif_device_detach(parent->canch[rc]->netdev);
> }
> - } else if (rc != -ESHUTDOWN && net_ratelimit()) {
> - netdev_info(netdev, "failed to re-submit IN URB: %pe\n",
> - ERR_PTR(rc));
> + } else if (rc != -ESHUTDOWN) {
> + dev_info_ratelimited(&parent->udev->dev,
> + "failed to re-submit IN URB: %pe\n",
> + ERR_PTR(rc));
[Severity: Low]
The commit message says:
Replace netdev_info() with dev_info_ratelimited() to output the affected
USB device, and also rate limit the number of messages to prevent log
flooding.
Is the "also rate limit" part accurate? The old code was already rate
limited by the net_ratelimit() check in the else-if condition.
What actually changes is the rate limit state. The old code used the
global net_ratelimit_state, which all networking messages share. The new
code uses the per call site state that dev_info_ratelimited() defines.
There are two smaller mismatches. The subject says "use dev_info()", but
the code calls dev_info_ratelimited(). The commit message also doesn't
mention that the netdev = NULL initializer was removed.
The removal looks safe at this commit. The short read check jumps to
resubmit_urb before netdev = dev->netdev is assigned, but the code it
reaches no longer reads netdev.
Could the commit message be updated to describe these changes?
[Severity: Low]
This patch finishes a fix for a problem that an earlier commit
introduced, but it has no Fixes: tag.
Commit 79a6d1bfe114 ("can: gs_usb: gs_usb_receive_bulk_callback():
unanchor URL on usb_submit_urb() error") added the netdev_info(netdev, ...)
call on this path. That call can be reached from the short read check:
minimum_length = sizeof(hf->header);
if (urb->actual_length < minimum_length) {
dev_err_ratelimited(&parent->udev->dev, ...);
goto resubmit_urb;
}
That jump happens before netdev = dev->netdev is assigned. If
usb_submit_urb() then fails with something other than -ENODEV or
-ESHUTDOWN, the message is printed without a valid netdev.
Commit 494fc029f662 ("can: gs_usb: gs_usb_receive_bulk_callback(): fix
error message") carried Fixes: 79a6d1bfe114. It only set netdev to NULL,
so the message prints "(NULL net_device)" and does not name the device.
Should this patch carry Fixes: 494fc029f662 (or Fixes: 79a6d1bfe114)?
That would let trees that took those commits find this follow-up.
> }
> }
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261122-gs_usb-fixes-v10-0-7c165c35d04a%40pengutronix.de
next prev parent reply other threads:[~2026-11-24 9:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 18:48 [PATCH can-next v10 00/14] gs_usb: fixes Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 01/14] can: gs_usb: gs_usb_probe(): init netdev completely before register_candev() Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 02/14] can: gs_usb: gs_usb_receive_bulk_callback(): check for overflow flag if SKB allocation fails Marc Kleine-Budde
2026-11-24 9:30 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 03/14] can: gs_usb: gs_usb_receive_bulk_callback(): add missing call to can_rx_offload_irq_finish Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 04/14] can: gs_usb: use spin_lock_irqsave() instead of spin_lock_bh() to protect struct gs_usb::tc Marc Kleine-Budde
2026-11-24 9:30 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 05/14] can: gs_usb: fix hardware timestamp state for mixed channels Marc Kleine-Budde
2026-11-24 9:30 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 06/14] can: gs_usb: add support for context analysis Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 07/14] can: gs_usb: gs_make_candev(): check can_rx_offload_add_manual() return value Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 08/14] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info() to print re-submit info messages Marc Kleine-Budde
2026-11-24 9:30 ` netdev-bot+sashiko [this message]
2026-11-22 18:48 ` [PATCH can-next v10 09/14] can: gs_usb: gs_usb_get_gs_can(): introduce new function to consolidate validation of struct gs_can Marc Kleine-Budde
2026-11-24 9:30 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 10/14] can: gs_usb: gs_usb_get_gs_can(): report channel number out of range error Marc Kleine-Budde
2026-11-22 18:48 ` [PATCH can-next v10 11/14] can: gs_usb: gs_usb_get_rx_data_length(): new function to consolidate validation of host frame Marc Kleine-Budde
2026-11-24 9:31 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 12/14] can: gs_usb: gs_can_start_xmit(): mask invalid parts of CAN ID before sending Marc Kleine-Budde
2026-11-24 9:31 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 13/14] can: gs_usb: gs_usb_host_frame_header_valid(): drop invalid CAN error frames Marc Kleine-Budde
2026-11-24 9:31 ` netdev-bot+sashiko
2026-11-22 18:48 ` [PATCH can-next v10 14/14] can: gs_usb: gs_usb_host_frame_header_valid(): drop CAN frames with invalid DLC Marc Kleine-Budde
2026-11-24 9:31 ` netdev-bot+sashiko
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=179551265819.3131.8321640293465934935@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=eric@evenchick.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=max@schneidersoft.net \
--cc=mkl@pengutronix.de \
--cc=pfink@christ-es.de \
--cc=stable@vger.kernel.org \
--cc=wg@grandegger.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