OSDN Git Service

Merge android-4.4.187 (8eb3d65) into msm-4.4
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / net / bluetooth / smp.c
index a19822b..d3114df 100644 (file)
@@ -178,7 +178,7 @@ static int aes_cmac(struct crypto_hash *tfm, const u8 k[16], const u8 *m,
                return -EFBIG;
 
        if (!tfm) {
-               BT_ERR("tfm %p", tfm);
+               BT_ERR("tfm %pK", tfm);
                return -EINVAL;
        }
 
@@ -381,7 +381,7 @@ static int smp_e(struct crypto_blkcipher *tfm, const u8 *k, u8 *r)
        SMP_DBG("k %16phN r %16phN", k, r);
 
        if (!tfm) {
-               BT_ERR("tfm %p", tfm);
+               BT_ERR("tfm %pK", tfm);
                return -EINVAL;
        }
 
@@ -953,7 +953,7 @@ static u8 smp_confirm(struct smp_chan *smp)
        struct smp_cmd_pairing_confirm cp;
        int ret;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        ret = smp_c1(smp->tfm_aes, smp->tk, smp->prnd, smp->preq, smp->prsp,
                     conn->hcon->init_addr_type, &conn->hcon->init_addr,
@@ -984,7 +984,7 @@ static u8 smp_random(struct smp_chan *smp)
        if (IS_ERR_OR_NULL(smp->tfm_aes))
                return SMP_UNSPECIFIED;
 
-       BT_DBG("conn %p %s", conn, conn->hcon->out ? "master" : "slave");
+       BT_DBG("conn %pK %s", conn, conn->hcon->out ? "master" : "slave");
 
        ret = smp_c1(smp->tfm_aes, smp->tk, smp->rrnd, smp->preq, smp->prsp,
                     hcon->init_addr_type, &hcon->init_addr,
@@ -1223,7 +1223,7 @@ static void smp_distribute_keys(struct smp_chan *smp)
        struct hci_dev *hdev = hcon->hdev;
        __u8 *keydist;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        rsp = (void *) &smp->prsp[1];
 
@@ -1353,7 +1353,7 @@ static void smp_timeout(struct work_struct *work)
                                            security_timer.work);
        struct l2cap_conn *conn = smp->conn;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        hci_disconnect(conn->hcon, HCI_ERROR_REMOTE_USER_TERM);
 }
@@ -1715,7 +1715,7 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb)
        u8 key_size, auth, sec_level;
        int ret;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*req))
                return SMP_INVALID_PARAMS;
@@ -1900,7 +1900,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
        u8 key_size, auth;
        int ret;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*rsp))
                return SMP_INVALID_PARAMS;
@@ -2052,7 +2052,7 @@ static u8 smp_cmd_pairing_confirm(struct l2cap_conn *conn, struct sk_buff *skb)
        struct l2cap_chan *chan = conn->smp;
        struct smp_chan *smp = chan->data;
 
-       BT_DBG("conn %p %s", conn, conn->hcon->out ? "master" : "slave");
+       BT_DBG("conn %pK %s", conn, conn->hcon->out ? "master" : "slave");
 
        if (skb->len < sizeof(smp->pcnf))
                return SMP_INVALID_PARAMS;
@@ -2098,7 +2098,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
        u32 passkey;
        int err;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(smp->rrnd))
                return SMP_INVALID_PARAMS;
@@ -2233,7 +2233,7 @@ static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)
        struct smp_chan *smp;
        u8 sec_level, auth;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*rp))
                return SMP_INVALID_PARAMS;
@@ -2296,7 +2296,7 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
        __u8 authreq;
        int ret;
 
-       BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level);
+       BT_DBG("conn %pK hcon %pK level 0x%2.2x", conn, hcon, sec_level);
 
        /* This may be NULL if there's an unexpected disconnection */
        if (!conn)
@@ -2424,7 +2424,7 @@ static int smp_cmd_encrypt_info(struct l2cap_conn *conn, struct sk_buff *skb)
        struct l2cap_chan *chan = conn->smp;
        struct smp_chan *smp = chan->data;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*rp))
                return SMP_INVALID_PARAMS;
@@ -2448,7 +2448,7 @@ static int smp_cmd_master_ident(struct l2cap_conn *conn, struct sk_buff *skb)
        struct smp_ltk *ltk;
        u8 authenticated;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*rp))
                return SMP_INVALID_PARAMS;
@@ -2570,7 +2570,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb)
        struct smp_chan *smp = chan->data;
        struct smp_csrk *csrk;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*rp))
                return SMP_INVALID_PARAMS;
@@ -2649,7 +2649,7 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb)
        struct smp_cmd_pairing_confirm cfm;
        int err;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*key))
                return SMP_INVALID_PARAMS;
@@ -2762,7 +2762,7 @@ static int smp_cmd_dhkey_check(struct l2cap_conn *conn, struct sk_buff *skb)
        u8 io_cap[3], r[16], e[16];
        int err;
 
-       BT_DBG("conn %p", conn);
+       BT_DBG("conn %pK", conn);
 
        if (skb->len < sizeof(*check))
                return SMP_INVALID_PARAMS;
@@ -2944,7 +2944,7 @@ static void smp_teardown_cb(struct l2cap_chan *chan, int err)
 {
        struct l2cap_conn *conn = chan->conn;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        if (chan->data)
                smp_chan_destroy(conn);
@@ -2961,7 +2961,7 @@ static void bredr_pairing(struct l2cap_chan *chan)
        struct smp_cmd_pairing req;
        struct smp_chan *smp;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        /* Only new pairings are interesting */
        if (!test_bit(HCI_CONN_NEW_LINK_KEY, &hcon->flags))
@@ -3027,7 +3027,7 @@ static void smp_resume_cb(struct l2cap_chan *chan)
        struct l2cap_conn *conn = chan->conn;
        struct hci_conn *hcon = conn->hcon;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        if (hcon->type == ACL_LINK) {
                bredr_pairing(chan);
@@ -3050,7 +3050,7 @@ static void smp_ready_cb(struct l2cap_chan *chan)
        struct l2cap_conn *conn = chan->conn;
        struct hci_conn *hcon = conn->hcon;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        /* No need to call l2cap_chan_hold() here since we already own
         * the reference taken in smp_new_conn_cb(). This is just the
@@ -3068,7 +3068,7 @@ static int smp_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
 {
        int err;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        err = smp_sig_channel(chan, skb);
        if (err) {
@@ -3120,7 +3120,7 @@ static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
 {
        struct l2cap_chan *chan;
 
-       BT_DBG("pchan %p", pchan);
+       BT_DBG("pchan %pK", pchan);
 
        chan = l2cap_chan_create();
        if (!chan)
@@ -3141,7 +3141,7 @@ static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan)
         */
        atomic_set(&chan->nesting, L2CAP_NESTING_SMP);
 
-       BT_DBG("created chan %p", chan);
+       BT_DBG("created chan %pK", chan);
 
        return chan;
 }
@@ -3246,7 +3246,7 @@ static void smp_del_chan(struct l2cap_chan *chan)
 {
        struct smp_dev *smp;
 
-       BT_DBG("chan %p", chan);
+       BT_DBG("chan %pK", chan);
 
        smp = chan->data;
        if (smp) {