Skip to content

Commit 011c728

Browse files
arndbJakub Kicinski
authored andcommitted
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: 938962d ("ionic: Add adminq action") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Shannon Nelson <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b306053 commit 011c728

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
33

4+
#include <linux/printk.h>
5+
#include <linux/dynamic_debug.h>
46
#include <linux/netdevice.h>
57
#include <linux/etherdevice.h>
68
#include <linux/rtnetlink.h>

drivers/net/ethernet/pensando/ionic/ionic_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
33

4+
#include <linux/printk.h>
5+
#include <linux/dynamic_debug.h>
46
#include <linux/module.h>
57
#include <linux/netdevice.h>
68
#include <linux/utsname.h>

include/linux/dynamic_debug.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ static inline int ddebug_dyndbg_module_param_cb(char *param, char *val,
204204
do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0)
205205
#define dynamic_dev_dbg(dev, fmt, ...) \
206206
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)
207213
#endif
208214

209215
#endif

0 commit comments

Comments
 (0)