can: etas_es58x: repair conditional for a verbose debug message
Subsystems (5)
PATCH 1/1 can: etas_es58x: repair conditional for a verbose debug message
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.
--- drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/etas_es58x/es58x_core.c +1 -1
@@ -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 ;
Signature · 1 line
2.17.1
Vincent MAILHOL
NAKHi Lukas,
Thank you for reporting this bug.
Quoted 1 line · Lukas Bulwahn
The definition of
VERBOSE_DEBUGfor detailled debugging is set simply by
^^^^^^^^^
detailed
Quoted 2 lines
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).
Quoted 3 lines
As the
netdev_vdbg()macro is already defined conditional ondefined(VERBOSE_DEBUG), there is really no need to duplicate the check before callingnetdev_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().
Quoted 2 lines
Repair the conditional for a verbose debug message.
If you want to send a v2, please also add the fix tag:
ETAS ES58X CAN USB interfaces")
Quoted 21 lines
Signed-off-by Lukas Bulwahn <[email protected]>--- drivers/net/can/usb/etas_es58x/es58x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/can/usb/etas_es58x/es58x_core.c +1
-2@@ -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