[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <bb1973868f9af8673cffdb5c77c590396d17554e.1314725877.git.jbaron@redhat.com>
Date: Tue, 30 Aug 2011 14:28:54 -0400
From: Jason Baron <jbaron@...hat.com>
To: gregkh@...e.de
Cc: joe@...ches.com, jim.cromie@...il.com, bvanassche@....org,
rdunlap@...otime.net, linux-kernel@...r.kernel.org
Subject: [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk'
Dynamic debug recently added support for netdev_printk. It uses
__netdev_printk() to support this functionality. However, when
CONFIG_NET is not set, we get the following error:
lib/built-in.o: In function `__dynamic_netdev_dbg':
(.text+0x9fda): undefined reference to `__netdev_printk'
Fix this by making the call to netdev_printk() contingent upon
CONFIG_NET. We could have fixed this by defining netdev_printk()
to a 'no-op' in the !CONFIG_NET case. However, this is not
consistent with how the networking layer uses netdev_printk.
For example, CONFIG_NET is not set, netdev_printk() does not
have a 'no-op' definition defined.
Signed-off-by: Jason Baron <jbaron@...hat.com>
Acked-by: Randy Dunlap <rdunlap@...otime.net>
---
lib/dynamic_debug.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 7314e5e..4138574 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -495,6 +495,8 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor,
}
EXPORT_SYMBOL(__dynamic_dev_dbg);
+#ifdef CONFIG_NET
+
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev, const char *fmt, ...)
{
@@ -516,6 +518,8 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor,
}
EXPORT_SYMBOL(__dynamic_netdev_dbg);
+#endif
+
static __initdata char ddebug_setup_string[1024];
static __init int ddebug_setup_query(char *str)
{
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists