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, shuangpeng.kernel@gmail.com,
stable@vger.kernel.org, vadim.fedorenko@linux.dev,
kuba@kernel.org
Subject: Re: [PATCH can-next v9 08/13] can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info() to print re-submit info messages
Date: Mon, 23 Nov 2026 12:00:25 +0000 [thread overview]
Message-ID: <179543522572.3131.13220832614638612242@kernel.org> (raw)
In-Reply-To: <20261121-gs_usb-fixes-v9-8-db121d488945@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] In gs_usb_receive_bulk_callback() (drivers/net/can/usb/gs_usb.c),
the patch replaces netdev_info() with dev_info_ratelimited() but…
--
can: gs_usb: gs_usb_receive_bulk_callback(): use dev_info() to print re-submit info messages
When an IN URB fails to re-submit before the network device is known,
gs_usb_receive_bulk_callback() used to call netdev_info() with a NULL
netdev. This patch logs against the USB device with
dev_info_ratelimited() instead. It also removes the NULL initialization
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..f49179cbd7876 100644
> --- a/drivers/net/can/usb/gs_usb.c
> +++ b/drivers/net/can/usb/gs_usb.c
[ ... ]
> @@ -820,8 +820,9 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
> 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));
> + dev_info_ratelimited(&parent->udev->dev,
> + "failed to re-submit IN URB: %pe\n",
> + ERR_PTR(rc));
[Severity: Low]
Is the net_ratelimit() check still needed here?
dev_info_ratelimited() already has its own per-callsite limiter through
dev_level_ratelimited() in include/linux/dev_printk.h:
static DEFINE_RATELIMIT_STATE(_rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);
if (__ratelimit(&_rs))
dev_level(dev, fmt, ##__VA_ARGS__);
That means this message now goes through two rate limiters. If
net_ratelimit() returns true but the local limiter suppresses the print,
a token from the global networking budget is used up and nothing gets
printed.
The short-read message earlier in the same function also logs against
the USB device, and it uses only the dev_*_ratelimited() helper:
if (urb->actual_length < minimum_length) {
dev_err_ratelimited(&parent->udev->dev,
"short read (actual_length=%u, minimum_length=%u)\n",
urb->actual_length, minimum_length);
Should this site drop the "&& net_ratelimit()" part to match?
The commit message also doesn't quite match the code:
"and also rate limit the number of messages to prevent log flooding."
net_ratelimit() was already limiting this message before the patch, so
the patch doesn't add rate limiting here. The subject says "use
dev_info()", but the code uses dev_info_ratelimited().
The duplicate limiting is also still present at the end of the series.
> }
> }
>
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121-gs_usb-fixes-v9-0-db121d488945%40pengutronix.de
parent reply other threads:[~2026-11-23 12:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261121-gs_usb-fixes-v9-8-db121d488945@pengutronix.de>]
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=179543522572.3131.13220832614638612242@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=shuangpeng.kernel@gmail.com \
--cc=stable@vger.kernel.org \
--cc=vadim.fedorenko@linux.dev \
--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