From: Jason Baron Date: Wed, 5 Oct 2011 00:43:26 +0000 (+1100) Subject: dynamic_debug: fix undefined reference to `__netdev_printk' X-Git-Tag: next-20111005~2^2~107 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=df54231ff31a26aecf924b51c9129394a9eadec8;p=karo-tx-linux.git 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 Acked-by: Randy Dunlap Cc: Greg KH Acked-by: Arnd Bergmann Signed-off-by: Andrew Morton --- diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 9a374abb5252..dcdade39e47f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -502,6 +502,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, ...) { @@ -523,6 +525,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) {