* [PATCH] can: etas_es58x: repair conditional for a verbose debug message
@ 2022-11-23 7:42 Lukas Bulwahn
2022-11-23 9:13 ` Vincent MAILHOL
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2022-11-23 7:42 UTC (permalink / raw)
To: Vincent Mailhol, Wolfgang Grandegger, Marc Kleine-Budde,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-can, netdev
Cc: kernel-janitors, linux-kernel, Lukas Bulwahn
The definition of VERBOSE_DEBUG for detailled debugging is set simply by
adding "#define VERBOSE_DEBUG" in the source code. It is not a kernel
configuration that is prefixed by CONFIG.
As the netdev_vdbg() macro is already defined conditional on
defined(VERBOSE_DEBUG), there is really no need to duplicate the check
before calling netdev_vdbg().
Repair the conditional for a verbose debug message.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c
index 25f863b4f5f0..2708909fb851 100644
--- a/drivers/net/can/usb/etas_es58x/es58x_core.c
+++ b/drivers/net/can/usb/etas_es58x/es58x_core.c
@@ -989,7 +989,7 @@ int es58x_rx_cmd_ret_u32(struct net_device *netdev,
break;
case ES58X_RET_TYPE_TX_MSG:
- if (IS_ENABLED(CONFIG_VERBOSE_DEBUG) && net_ratelimit())
+ if (net_ratelimit())
netdev_vdbg(netdev, "%s: OK\n", ret_desc);
break;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] can: etas_es58x: repair conditional for a verbose debug message
2022-11-23 7:42 [PATCH] can: etas_es58x: repair conditional for a verbose debug message Lukas Bulwahn
@ 2022-11-23 9:13 ` Vincent MAILHOL
0 siblings, 0 replies; 2+ messages in thread
From: Vincent MAILHOL @ 2022-11-23 9:13 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Wolfgang Grandegger, Marc Kleine-Budde, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-can, netdev,
kernel-janitors, linux-kernel
Hi Lukas,
Thank you for reporting this bug.
On Wed. 23 Nov. 2022 at 16:45, Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
> The definition of VERBOSE_DEBUG for detailled debugging is set simply by
^^^^^^^^^
detailed
> adding "#define VERBOSE_DEBUG" in the source code. It is not a kernel
> configuration that is prefixed by CONFIG.
ACK.
I initially used #ifdef VERBOSE_DEBUG but then inadvertently replaced
it by IS_ENABLED(CONFIG_VERBOSE_DEBUG) instead of
defined(VERBOSE_DEBUG).
> As the netdev_vdbg() macro is already defined conditional on
> defined(VERBOSE_DEBUG), there is really no need to duplicate the check
> before calling netdev_vdbg().
NACK.
There is a need. net_ratelimit() will continue to emit those messages:
net_ratelimit: xxxx callbacks suppressed
The goal of this check is to guard net_ratelimit(), not to guard netdev_vdbg().
> Repair the conditional for a verbose debug message.
>
If you want to send a v2, please also add the fix tag:
Fixes: commit 8537257874e9 ("can: etas_es58x: add core support for
ETAS ES58X CAN USB interfaces")
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
> drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.c b/drivers/net/can/usb/etas_es58x/es58x_core.c
> index 25f863b4f5f0..2708909fb851 100644
> --- a/drivers/net/can/usb/etas_es58x/es58x_core.c
> +++ b/drivers/net/can/usb/etas_es58x/es58x_core.c
> @@ -989,7 +989,7 @@ int es58x_rx_cmd_ret_u32(struct net_device *netdev,
> break;
>
> case ES58X_RET_TYPE_TX_MSG:
> - if (IS_ENABLED(CONFIG_VERBOSE_DEBUG) && net_ratelimit())
> + if (net_ratelimit())
> netdev_vdbg(netdev, "%s: OK\n", ret_desc);
> break;
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-23 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 7:42 [PATCH] can: etas_es58x: repair conditional for a verbose debug message Lukas Bulwahn
2022-11-23 9:13 ` Vincent MAILHOL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).