diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-09-18 15:55:11 -0400 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-22 15:54:44 -0400 |
commit | 011c7289de619d76f82b0d9e9fec3f59d2fe57f7 (patch) | |
tree | 60e24049c5b0d546ea92d8c68d17663117f5c8b7 | |
parent | b3060531979422d5bb18d80226f978910284dc70 (diff) |
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.
Fixes: 938962d55229 ("ionic: Add adminq action")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_main.c | 2 | ||||
-rw-r--r-- | include/linux/dynamic_debug.h | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 72107a0627a9..20faa8d24c9f 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c | |||
@@ -1,6 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ | 2 | /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ |
3 | 3 | ||
4 | #include <linux/printk.h> | ||
5 | #include <linux/dynamic_debug.h> | ||
4 | #include <linux/netdevice.h> | 6 | #include <linux/netdevice.h> |
5 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
6 | #include <linux/rtnetlink.h> | 8 | #include <linux/rtnetlink.h> |
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index 15e432386b35..aab311413412 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c | |||
@@ -1,6 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ | 2 | /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */ |
3 | 3 | ||
4 | #include <linux/printk.h> | ||
5 | #include <linux/dynamic_debug.h> | ||
4 | #include <linux/module.h> | 6 | #include <linux/module.h> |
5 | #include <linux/netdevice.h> | 7 | #include <linux/netdevice.h> |
6 | #include <linux/utsname.h> | 8 | #include <linux/utsname.h> |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 6c809440f319..4cf02ecd67de 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -204,6 +204,12 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, | |||
204 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) | 204 | do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) |
205 | #define dynamic_dev_dbg(dev, fmt, ...) \ | 205 | #define dynamic_dev_dbg(dev, fmt, ...) \ |
206 | do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) | 206 | do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) |
207 | #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ | ||
208 | groupsize, buf, len, ascii) \ | ||
209 | do { if (0) \ | ||
210 | print_hex_dump(KERN_DEBUG, prefix_str, prefix_type, \ | ||
211 | rowsize, groupsize, buf, len, ascii); \ | ||
212 | } while (0) | ||
207 | #endif | 213 | #endif |
208 | 214 | ||
209 | #endif | 215 | #endif |