mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: gregkh@suse.de
Cc: joe@perches.com, jim.cromie@gmail.com, bvanassche@acm.org,
	rdunlap@xenotime.net, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk'
Date: Tue, 30 Aug 2011 14:28:54 -0400	[thread overview]
Message-ID: <bb1973868f9af8673cffdb5c77c590396d17554e.1314725877.git.jbaron@redhat.com> (raw)
In-Reply-To: <cover.1314725877.git.jbaron@redhat.com>

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@redhat.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.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


  parent reply	other threads:[~2011-08-30 18:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 18:28 [PATCH 0/4] dynamic debug: cleanups + compile fix v2 Jason Baron
2011-08-30 18:28 ` [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions Jason Baron
2011-09-08 23:52   ` Andrew Morton
2011-09-09  2:13     ` Joe Perches
2011-09-09  3:42       ` Andrew Morton
2011-09-09  4:02         ` Joe Perches
2011-09-09  4:20           ` Andrew Morton
2011-09-09  4:35             ` Joe Perches
2011-09-09 10:31           ` Bart Van Assche
2011-09-09 19:23             ` Jim Cromie
2011-09-09 21:04               ` Joe Perches
2011-09-09 22:06                 ` Jim Cromie
2011-09-09 22:32                   ` Joe Perches
2011-09-12 14:47                     ` Jason Baron
2011-09-12 18:15                       ` Jim Cromie
2011-09-12 15:00               ` Jason Baron
2011-08-30 18:28 ` [PATCH 2/4] dynamic_debug: remove num_enabled accounting Jason Baron
2011-08-30 18:28 ` [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs Jason Baron
2011-09-08 23:52   ` Andrew Morton
2011-08-30 18:28 ` Jason Baron [this message]
2011-09-01 16:16   ` [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk' Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2011-08-25 17:34 [PATCH 0/4] dynamic debug: cleanups + compile fix Jason Baron
2011-08-25 17:34 ` [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk' Jason Baron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb1973868f9af8673cffdb5c77c590396d17554e.1314725877.git.jbaron@redhat.com \
    --to=jbaron@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=gregkh@suse.de \
    --cc=jim.cromie@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®