dynamic_debug: provide dynamic_hex_dump stub
Subsystems (4)
PATCH 1/1 dynamic_debug: provide dynamic_hex_dump stub
The ionic driver started using dymamic_hex_dump(), but that is not always defined:
drivers/net/ethernet/pensando/ionic/ionic_main.c:229:2: error: implicit declaration of function 'dynamic_hex_dump' [-Werror,-Wimplicit-function-declaration]
Add a dummy implementation to use when CONFIG_DYNAMIC_DEBUG is disabled, printing nothing.
--- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ drivers/net/ethernet/pensando/ionic/ionic_main.c | 2 ++ include/linux/dynamic_debug.h | 6 ++++++ 3 files changed, 10 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +2 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ +#include <linux/printk.h> +#include <linux/dynamic_debug.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/rtnetlink.h>
drivers/net/ethernet/pensando/ionic/ionic_main.c +2 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ +#include <linux/printk.h> +#include <linux/dynamic_debug.h> #include <linux/module.h> #include <linux/netdevice.h> #include <linux/utsname.h>
include/linux/dynamic_debug.h +6 -0
@@ -204,6 +204,12 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0)#define dynamic_dev_dbg (dev, fmt, ...) \ do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) +#define dynamic_hex_dump (prefix_str, prefix_type, rowsize, \ + groupsize, buf, len, ascii) \ + do { if (0) \ + print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, \ + rowsize, groupsize, buf, len, ascii); \ + } while (0)#endif #endif
Signature · 1 line
2.20.0
Quoted 49 lines · Arnd Bergmann
The ionic driver started using
dymamic_hex_dump(), but that is not always defined:
drivers/net/ethernet/pensando/ionic/ionic_main.c:229:2: error: implicit declaration of function 'dynamic_hex_dump' [-Werror,-Wimplicit-function-declaration]Add a dummy implementation to use when
CONFIG_DYNAMIC_DEBUGis disabled, printing nothing.Fixes 938962d55229 ("ionic: Add adminq action")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 ++ drivers/net/ethernet/pensando/ionic/ionic_main.c | 2 ++ include/linux/dynamic_debug.h | 6 ++++++ 3 files changed, 10 insertions(+)drivers/net/ethernet/pensando/ionic/ionic_lif.c +2
-0@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ +#include <linux/printk.h> +#include <linux/dynamic_debug.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/rtnetlink.h> drivers/net/ethernet/pensando/ionic/ionic_main.c +2
-0@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ +#include <linux/printk.h> +#include <linux/dynamic_debug.h> #include <linux/module.h> #include <linux/netdevice.h> #include <linux/utsname.h> include/linux/dynamic_debug.h +0
-0@@ -204,6 +204,12 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0)#define dynamic_dev_dbg (dev, fmt, ...) \
include/linux/dynamic_debug.h static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, · line 215
Quoted 10 lines
include/linux/dynamic_debug.h +6
-0do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) +#define dynamic_hex_dump (prefix_str, prefix_type, rowsize, \ + groupsize, buf, len, ascii) \ + do { if (0) \ + print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, \ + rowsize, groupsize, buf, len, ascii); \ + } while (0)#endif #endif
Thanks, I hadn't had a chance to look into that one yet.
Quoted 10 lines · Arnd Bergmann
The ionic driver started using
dymamic_hex_dump(), but that is not always defined:
drivers/net/ethernet/pensando/ionic/ionic_main.c:229:2: error: implicit declaration of function 'dynamic_hex_dump' [-Werror,-Wimplicit-function-declaration]Add a dummy implementation to use when
CONFIG_DYNAMIC_DEBUGis disabled, printing nothing.Fixes 938962d55229 ("ionic: Add adminq action")Signed-off-by Arnd Bergmann <[email protected]>
Looks like this still doesn't appear in any tree, after a month (judging by linux-next).
Can we take this into the networking tree? Please scream at me if I'm missing something or this would not be appropriate.
Quoted 10 lines · Arnd Bergmann
The ionic driver started using
dymamic_hex_dump(), but that is not always defined:
drivers/net/ethernet/pensando/ionic/ionic_main.c:229:2: error: implicit declaration of function 'dynamic_hex_dump' [-Werror,-Wimplicit-function-declaration]Add a dummy implementation to use when
CONFIG_DYNAMIC_DEBUGis disabled, printing nothing.Fixes 938962d55229 ("ionic: Add adminq action")Signed-off-by Arnd Bergmann <[email protected]>
Patch applied to net/master, thanks!