public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: marcel@holtmann.org, gustavo@padovan.org, johan.hedberg@gmail.com
Cc: linville@tuxdriver.com, linux-bluetooth@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: [PATCH] bluetooth: properly use pr_fmt() on lib.c
Date: Mon, 23 Apr 2012 19:45:06 -0700	[thread overview]
Message-ID: <1335235506-32243-1-git-send-email-mcgrof@do-not-panic.com> (raw)

From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>

pr_fmt() is either defined or we redefine it. Typically
drivers define it prior to including printk.h but this
is done under the assumption that no other subsystem
it uses has already defined pr_fmt(). In such cases
pr_fmt() should be undefined and redefined.

Doing this properly shaves down compilation time quite
considerably.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/bluetooth/lib.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index 5066288..84ff96f 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -24,11 +24,13 @@
 
 /* Bluetooth kernel library. */
 
+#undef pr_fmt
 #define pr_fmt(fmt) "Bluetooth: " fmt
 
 #include <linux/module.h>
 
 #include <linux/kernel.h>
+#include <linux/printk.h>
 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <asm/errno.h>
-- 
1.7.10.rc1.22.gf5241

             reply	other threads:[~2012-04-24  2:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  2:45 Luis R. Rodriguez [this message]
2012-04-24  4:16 ` [PATCH] bluetooth: properly use pr_fmt() on lib.c Gustavo Padovan
2012-04-24  8:06   ` Marcel Holtmann

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=1335235506-32243-1-git-send-email-mcgrof@do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=marcel@holtmann.org \
    /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