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>
This commit is contained in:
committed by
Gustavo Padovan
parent
36a75f1b3e
commit
6ed93dc642
@ -172,7 +172,7 @@ static int sco_connect(struct sock *sk)
|
||||
struct hci_dev *hdev;
|
||||
int err, type;
|
||||
|
||||
BT_DBG("%s -> %s", batostr(src), batostr(dst));
|
||||
BT_DBG("%pMR -> %pMR", src, dst);
|
||||
|
||||
hdev = hci_get_route(dst, src);
|
||||
if (!hdev)
|
||||
@ -460,7 +460,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
|
||||
struct sock *sk = sock->sk;
|
||||
int err = 0;
|
||||
|
||||
BT_DBG("sk %p %s", sk, batostr(&sa->sco_bdaddr));
|
||||
BT_DBG("sk %p %pMR", sk, &sa->sco_bdaddr);
|
||||
|
||||
if (!addr || addr->sa_family != AF_BLUETOOTH)
|
||||
return -EINVAL;
|
||||
@ -893,7 +893,7 @@ int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr)
|
||||
struct hlist_node *node;
|
||||
int lm = 0;
|
||||
|
||||
BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));
|
||||
BT_DBG("hdev %s, bdaddr %pMR", hdev->name, bdaddr);
|
||||
|
||||
/* Find listening sockets */
|
||||
read_lock(&sco_sk_list.lock);
|
||||
@ -914,7 +914,7 @@ int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr)
|
||||
|
||||
void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
|
||||
{
|
||||
BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);
|
||||
BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
|
||||
if (!status) {
|
||||
struct sco_conn *conn;
|
||||
|
||||
|
Reference in New Issue
Block a user