* [PATCH] dynamic_debug: provide dynamic_hex_dump stub
@ 2019-09-18 19:55 Arnd Bergmann
2019-09-18 20:47 ` Shannon Nelson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-09-18 19:55 UTC (permalink / raw)
To: Shannon Nelson, Pensando Drivers, David S. Miller, Jason Baron
Cc: Arnd Bergmann, Andrew Morton, netdev, linux-kernel
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>
---
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(+)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index db7c82742828..a255d24c8e40 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -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>
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 @@
// 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>
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,
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
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dynamic_debug: provide dynamic_hex_dump stub
2019-09-18 19:55 [PATCH] dynamic_debug: provide dynamic_hex_dump stub Arnd Bergmann
@ 2019-09-18 20:47 ` Shannon Nelson
2019-10-22 0:48 ` Jakub Kicinski
2019-10-22 19:56 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Shannon Nelson @ 2019-09-18 20:47 UTC (permalink / raw)
To: Arnd Bergmann, Pensando Drivers, David S. Miller, Jason Baron
Cc: Andrew Morton, netdev, linux-kernel
On 9/18/19 12:55 PM, Arnd Bergmann wrote:
> 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>
> ---
> 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(+)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index db7c82742828..a255d24c8e40 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -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>
> 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 @@
> // 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>
> 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,
> 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
Thanks, I hadn't had a chance to look into that one yet.
Acked-by: Shannon Nelson <snelson@pensando.io>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dynamic_debug: provide dynamic_hex_dump stub
2019-09-18 19:55 [PATCH] dynamic_debug: provide dynamic_hex_dump stub Arnd Bergmann
2019-09-18 20:47 ` Shannon Nelson
@ 2019-10-22 0:48 ` Jakub Kicinski
2019-10-22 19:56 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2019-10-22 0:48 UTC (permalink / raw)
To: Arnd Bergmann, Jason Baron
Cc: Shannon Nelson, Pensando Drivers, David S. Miller, Andrew Morton,
netdev, linux-kernel
On Wed, 18 Sep 2019 21:55:11 +0200, Arnd Bergmann wrote:
> 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>
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dynamic_debug: provide dynamic_hex_dump stub
2019-09-18 19:55 [PATCH] dynamic_debug: provide dynamic_hex_dump stub Arnd Bergmann
2019-09-18 20:47 ` Shannon Nelson
2019-10-22 0:48 ` Jakub Kicinski
@ 2019-10-22 19:56 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2019-10-22 19:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Shannon Nelson, Pensando Drivers, David S. Miller, Jason Baron,
Andrew Morton, netdev, linux-kernel
On Wed, 18 Sep 2019 21:55:11 +0200, Arnd Bergmann wrote:
> 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>
Patch applied to net/master, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-22 19:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 19:55 [PATCH] dynamic_debug: provide dynamic_hex_dump stub Arnd Bergmann
2019-09-18 20:47 ` Shannon Nelson
2019-10-22 0:48 ` Jakub Kicinski
2019-10-22 19:56 ` Jakub Kicinski
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).