[PATCH V2 0/3] bluetooth: Shrink object size, use current logging style

February 17th, 2012 - 02:40 am ET by Joe Perches | Report spam
Save some small amount of text and use more common logging styles.

V2:
Separate the logging function patch from the BT_INFO/BT_ERR macro conversion.
At some point, the BT_INFO/BT_ERR/BT_DBG macros could be removed.

Joe Perches (3):
bluetooth: Add logging functions bt_info and bt_err
bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
bluetooth: Convert BT_DBG to pr_debug

drivers/bluetooth/ath3k.c | 56 ++++-
drivers/bluetooth/bcm203x.c | 34 ++--
drivers/bluetooth/bfusb.c | 102 +++++++
drivers/bluetooth/bluecard_cs.c | 17 +-
drivers/bluetooth/bpa10x.c | 48 +++
drivers/bluetooth/bt3c_cs.c | 36 +++--
drivers/bluetooth/btmrvl_debugfs.c | 2 +-
drivers/bluetooth/btmrvl_main.c | 102 +++++++
drivers/bluetooth/btmrvl_sdio.c | 149 +++++++++
drivers/bluetooth/btsdio.c | 26 ++--
drivers/bluetooth/btuart_cs.c | 23 ++--
drivers/bluetooth/btusb.c | 86 +++++--
drivers/bluetooth/btwilink.c | 46 +++
drivers/bluetooth/dtl1_cs.c | 19 ++-
drivers/bluetooth/hci_ath.c | 14 +-
drivers/bluetooth/hci_bcsp.c | 78 +++++--
drivers/bluetooth/hci_h4.c | 18 +-
drivers/bluetooth/hci_ldisc.c | 37 +++
drivers/bluetooth/hci_ll.c | 83 ++++++--
drivers/bluetooth/hci_vhci.c | 6 +-
include/net/bluetooth/bluetooth.h | 14 +-
include/net/bluetooth/hci_core.h | 6 +-
include/net/bluetooth/l2cap.h | 2 +-
net/bluetooth/af_bluetooth.c | 20 ++--
net/bluetooth/bnep/core.c | 30 ++--
net/bluetooth/bnep/netdev.c | 14 +-
net/bluetooth/bnep/sock.c | 10 +-
net/bluetooth/cmtp/capi.c | 50 +++
net/bluetooth/cmtp/core.c | 31 ++--
net/bluetooth/cmtp/sock.c | 10 +-
net/bluetooth/hci_conn.c | 58 ++++-
net/bluetooth/hci_core.c | 175 +++++++++++-
net/bluetooth/hci_event.c | 298 ++++++++++++++++++
net/bluetooth/hci_sock.c | 26 ++--
net/bluetooth/hci_sysfs.c | 10 +-
net/bluetooth/hidp/core.c | 58 ++++
net/bluetooth/hidp/sock.c | 10 +-
net/bluetooth/l2cap_core.c | 221 ++++++++++++++-
net/bluetooth/l2cap_sock.c | 40 +++
net/bluetooth/lib.c | 27 +++-
net/bluetooth/mgmt.c | 95 ++++++
net/bluetooth/rfcomm/core.c | 180 +++++++++++--
net/bluetooth/rfcomm/sock.c | 57 ++++-
net/bluetooth/rfcomm/tty.c | 106 +++++++-
net/bluetooth/sco.c | 77 +++++--
net/bluetooth/smp.c | 47 +++
46 files changed, 1366 insertions(+), 1288 deletions(-)

1.7.8.111.gad25c.dirty

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 6 repliesReplies Make a reply

Replies

#1 Marcel Holtmann
February 17th, 2012 - 03:40 am ET | Report spam
Hi Joe,

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

include/net/bluetooth/bluetooth.h | 14 ++++++++
net/bluetooth/lib.c | 27 ++++++++++++++++++++++++
2 files changed, 32 insertions(+), 9 deletions(-)



lets try to get at least this patch merged. I hope we don't have too
many conflicts.

Acked-by: Marcel Holtmann

Regards

Marcel


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics