diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-09-25 05:49:43 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-09-27 17:10:00 -0400 |
commit | 6ed93dc6427d14cdfe0b272cc0a9ee4685ce9ad7 (patch) | |
tree | fbb25833b61cbaabe5a7cd81240f02334bf999b7 /net/bluetooth/hci_event.c | |
parent | 36a75f1b3ecf94dcf140b9d3d2f7a03b7e258480 (diff) |
Bluetooth: Use %pMR in debug instead of batostr
Instead of old unsafe batostr function use %pMR print specifier
for printing Bluetooth addresses in debug and error statements.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 2551c4b9d65e..3151d8581733 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1266,7 +1266,7 @@ static void hci_cs_create_conn(struct hci_dev *hdev, __u8 status) | |||
1266 | 1266 | ||
1267 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); | 1267 | conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); |
1268 | 1268 | ||
1269 | BT_DBG("%s bdaddr %s hcon %p", hdev->name, batostr(&cp->bdaddr), conn); | 1269 | BT_DBG("%s bdaddr %pMR hcon %p", hdev->name, &cp->bdaddr, conn); |
1270 | 1270 | ||
1271 | if (status) { | 1271 | if (status) { |
1272 | if (conn && conn->state == BT_CONNECT) { | 1272 | if (conn && conn->state == BT_CONNECT) { |
@@ -1695,8 +1695,7 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status) | |||
1695 | return; | 1695 | return; |
1696 | } | 1696 | } |
1697 | 1697 | ||
1698 | BT_DBG("%s bdaddr %s conn %p", hdev->name, batostr(&conn->dst), | 1698 | BT_DBG("%s bdaddr %pMR conn %p", hdev->name, &conn->dst, conn); |
1699 | conn); | ||
1700 | 1699 | ||
1701 | conn->state = BT_CLOSED; | 1700 | conn->state = BT_CLOSED; |
1702 | mgmt_connect_failed(hdev, &conn->dst, conn->type, | 1701 | mgmt_connect_failed(hdev, &conn->dst, conn->type, |
@@ -1910,7 +1909,7 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
1910 | struct hci_ev_conn_request *ev = (void *) skb->data; | 1909 | struct hci_ev_conn_request *ev = (void *) skb->data; |
1911 | int mask = hdev->link_mode; | 1910 | int mask = hdev->link_mode; |
1912 | 1911 | ||
1913 | BT_DBG("%s bdaddr %s type 0x%x", hdev->name, batostr(&ev->bdaddr), | 1912 | BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, |
1914 | ev->link_type); | 1913 | ev->link_type); |
1915 | 1914 | ||
1916 | mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type); | 1915 | mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type); |
@@ -2809,13 +2808,13 @@ static void hci_link_key_request_evt(struct hci_dev *hdev, struct sk_buff *skb) | |||
2809 | 2808 | ||
2810 | key = hci_find_link_key(hdev, &ev->bdaddr); | 2809 | key = hci_find_link_key(hdev, &ev->bdaddr); |
2811 | if (!key) { | 2810 | if (!key) { |
2812 | BT_DBG("%s link key not found for %s", hdev->name, | 2811 | BT_DBG("%s link key not found for %pMR", hdev->name, |
2813 | batostr(&ev->bdaddr)); | 2812 | &ev->bdaddr); |
2814 | goto not_found; | 2813 | goto not_found; |
2815 | } | 2814 | } |
2816 | 2815 | ||
2817 | BT_DBG("%s found key type %u for %s", hdev->name, key->type, | 2816 | BT_DBG("%s found key type %u for %pMR", hdev->name, key->type, |
2818 | batostr(&ev->bdaddr)); | 2817 | &ev->bdaddr); |
2819 | 2818 | ||
2820 | if (!test_bit(HCI_DEBUG_KEYS, &hdev->dev_flags) && | 2819 | if (!test_bit(HCI_DEBUG_KEYS, &hdev->dev_flags) && |
2821 | key->type == HCI_LK_DEBUG_COMBINATION) { | 2820 | key->type == HCI_LK_DEBUG_COMBINATION) { |