aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-17 02:32:42 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-17 04:33:17 -0500
commit3ed7003e724a04482e0ef1e794eece8c1c177b37 (patch)
treea098bcf0b24e9b9b0d6a94192e250db91e6c86f4 /include/net/bluetooth/bluetooth.h
parented2c4ee360709ca838efa0ea4d6295590aff3d24 (diff)
Bluetooth: Add logging functions bt_info and bt_err
Use specific logging functions instead of a generic bt_printk function can save some text. Remove now unused bt_printk function. Add compatibility BT_INFO and BT_ERR macros. (compiled x86 and defconfig with bluetooth and all bluetooth drivers) $ size net/bluetooth/built-in.o* text data bss dec hex filename 381662 20072 100416 502150 7a986 net/bluetooth/built-in.o.allyesconfig.new 382463 20072 100400 502935 7ac97 net/bluetooth/built-in.o.allyesconfig.old 126635 1388 132 128155 1f49b net/bluetooth/built-in.o.defconfig.new 127175 1388 132 128695 1f6b7 net/bluetooth/built-in.o.defconfig.old $ size drivers/bluetooth/built-in.o* 127575 8976 29476 166027 2888b drivers/bluetooth/built-in.o.allyesconfig.new 129512 8976 29516 168004 29044 drivers/bluetooth/built-in.o.allyesconfig.old 52998 3292 156 56446 dc7e drivers/bluetooth/built-in.o.defconfig.new 54358 3292 156 57806 e1ce drivers/bluetooth/built-in.o.defconfig.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r--include/net/bluetooth/bluetooth.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 4a82ca0bb0b2..9f5f2c1c5554 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -109,12 +109,14 @@ struct bt_power {
109 */ 109 */
110#define BT_CHANNEL_POLICY_AMP_PREFERRED 2 110#define BT_CHANNEL_POLICY_AMP_PREFERRED 2
111 111
112__printf(2, 3) 112__printf(1, 2)
113int bt_printk(const char *level, const char *fmt, ...); 113int bt_info(const char *fmt, ...);
114 114__printf(1, 2)
115#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg) 115int bt_err(const char *fmt, ...);
116#define BT_ERR(fmt, arg...) bt_printk(KERN_ERR, pr_fmt(fmt), ##arg) 116
117#define BT_DBG(fmt, arg...) pr_debug(fmt "\n", ##arg) 117#define BT_INFO(fmt, ...) bt_info(fmt "\n", ##__VA_ARGS__)
118#define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__)
119#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)
118 120
119/* Connection and socket states */ 121/* Connection and socket states */
120enum { 122enum {