public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bluetooth: properly use pr_fmt() on lib.c
@ 2012-04-24  2:45 Luis R. Rodriguez
  2012-04-24  4:16 ` Gustavo Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2012-04-24  2:45 UTC (permalink / raw)
  To: marcel, gustavo, johan.hedberg
  Cc: linville, linux-bluetooth, Luis R. Rodriguez

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bluetooth: properly use pr_fmt() on lib.c
  2012-04-24  2:45 [PATCH] bluetooth: properly use pr_fmt() on lib.c Luis R. Rodriguez
@ 2012-04-24  4:16 ` Gustavo Padovan
  2012-04-24  8:06   ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Padovan @ 2012-04-24  4:16 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: marcel, johan.hedberg, linville, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

Hi Luiz,

* Luis R. Rodriguez <mcgrof@do-not-panic.com> [2012-04-23 19:45:06 -0700]:

> 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(+)

Patch has been applie, thanks.

	Gustavo

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bluetooth: properly use pr_fmt() on lib.c
  2012-04-24  4:16 ` Gustavo Padovan
@ 2012-04-24  8:06   ` Marcel Holtmann
  0 siblings, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2012-04-24  8:06 UTC (permalink / raw)
  To: Gustavo Padovan
  Cc: Luis R. Rodriguez, johan.hedberg, linville, linux-bluetooth

Hi Gustavo,

> > 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(+)
> 
> Patch has been applie, thanks.

please get into the habit to let them know if it got applied to
bluetooth tree or bluetooth-next tree or both.

Regards

Marcel



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-24  8:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24  2:45 [PATCH] bluetooth: properly use pr_fmt() on lib.c Luis R. Rodriguez
2012-04-24  4:16 ` Gustavo Padovan
2012-04-24  8:06   ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox