bluetooth: properly use pr_fmt() on lib.c
Subsystems (2)
PATCH 1/1 bluetooth: properly use pr_fmt() on lib.c
From: "Luis R. Rodriguez" <[email protected]>
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.
--- net/bluetooth/lib.c | 2 ++ 1 file changed, 2 insertions(+)
net/bluetooth/lib.c +2 -0
@@ -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>
Signature · 1 line
1.7.10.rc1.22.gf5241
Hi Luiz,
Quoted 8 lines · Luis R. Rodriguez
From: "Luis R. Rodriguez" <[email protected]>
pr_fmt()is either defined or we redefine it. Typically drivers define it prior to includingprintk.hbut this is done under the assumption that no other subsystem it uses has already definedpr_fmt(). In such casespr_fmt()should be undefined and redefined.
Quoted 7 lines
Doing this properly shaves down compilation time quite considerably.
Signed-off-by Luis R. Rodriguez <[email protected]>--- net/bluetooth/lib.c | 2 ++ 1 file changed, 2 insertions(+)
Patch has been applie, thanks.
Gustavo
Marcel Holtmann
maintainerHi Gustavo,
Quoted 9 lines
Quoted 9 lines
pr_fmt()is either defined or we redefine it. Typically drivers define it prior to includingprintk.hbut this is done under the assumption that no other subsystem it uses has already definedpr_fmt(). In such casespr_fmt()should be undefined and redefined.Doing this properly shaves down compilation time quite considerably.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Luis R. Rodriguez <[email protected]>--- 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