linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Wang <nwang@suse.com>
To: davem@davemloft.net
Cc: whs_alex@163.com, nwang@suse.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Nick Wang <nwang@suse.de>
Subject: [PATCH] include/net/inet_connection_sock.h: Use pr_devel() instead of pr_debug()
Date: Tue,  8 Mar 2016 13:52:28 +0800	[thread overview]
Message-ID: <1457416348-32463-1-git-send-email-nwang@suse.com> (raw)

When DYNAMIC_DEBUG enabled, pr_debug() depends on KBUILD_MODNAME which
also depends on the modules name in Makefile.
Refer to the information in "scripts/Makefile.lib":

 # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will
 # end up in (or would, if it gets compiled in)
 # Note: Files that end up in two or more modules are compiled without the
 #       KBUILD_MODNAME definition. The reason is that any made-up name would
 #       differ in different configs.

File "inet_connection_sock.h" is a common share header that not can 
be use for one module, so use pr_devel instead of pr_debug is OK.

In file included from include/linux/printk.h:277:0,
                 from include/linux/kernel.h:13,
                 from include/linux/list.h:8,
                 from include/linux/kobject.h:20,
                 from include/linux/device.h:17,
                 from include/rdma/ib_verbs.h:43,
                 from /usr/src/drbd-9.0/drbd/drbd-kernel-compat/tests/have_ib_cq_init_attr.c:1:
include/net/inet_connection_sock.h: In function ‘inet_csk_clear_xmit_timer’:
include/linux/dynamic_debug.h:66:14: error: ‘KBUILD_MODNAME’ undeclared (first use in this function)
   .modname = KBUILD_MODNAME,   \
              ^
include/linux/dynamic_debug.h:76:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
include/linux/printk.h:283:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^
include/net/inet_connection_sock.h:213:3: note: in expansion of macro ‘pr_debug’
   pr_debug("%s", inet_csk_timer_bug_msg);
   ^

Signed-off-by: Nick Wang <nwang@suse.de>
---
 include/net/inet_connection_sock.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 49dcad4..b59be52 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -210,7 +210,7 @@ static inline void inet_csk_clear_xmit_timer(struct sock *sk, const int what)
 	}
 #ifdef INET_CSK_DEBUG
 	else {
-		pr_debug("%s", inet_csk_timer_bug_msg);
+		pr_devel("%s", inet_csk_timer_bug_msg);
 	}
 #endif
 }
@@ -226,7 +226,7 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what,
 
 	if (when > max_when) {
 #ifdef INET_CSK_DEBUG
-		pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
+		pr_devel("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
 			 sk, what, when, current_text_addr());
 #endif
 		when = max_when;
@@ -244,7 +244,7 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what,
 	}
 #ifdef INET_CSK_DEBUG
 	else {
-		pr_debug("%s", inet_csk_timer_bug_msg);
+		pr_devel("%s", inet_csk_timer_bug_msg);
 	}
 #endif
 }
-- 
1.8.5.6

             reply	other threads:[~2016-03-08  5:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08  5:52 Nick Wang [this message]
2016-03-10 21:14 ` [PATCH] include/net/inet_connection_sock.h: Use pr_devel() instead of pr_debug() David Miller

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=1457416348-32463-1-git-send-email-nwang@suse.com \
    --to=nwang@suse.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nwang@suse.de \
    --cc=whs_alex@163.com \
    /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;
as well as URLs for NNTP newsgroup(s).