summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDibyendu Roy <dibyen@codeaurora.org>2016-06-21 13:34:28 +0530
committerKyle Yan <kyan@codeaurora.org>2016-06-28 17:01:54 -0700
commitb378543680c2a1f52fc91e0a10921184ec2a842c (patch)
treeda87ae4b577375d9784858f99238082b0f24ff63
parent88196d66781e7b593ff64fc2d34bcc8151d8e310 (diff)
Bluetooth: Replace %p with %pK
The %pK restrictions are used to eliminate exposing kernel addresses. When kptr_restrict is set to "0" there are no restrictions. When kptr_restrict is set to "1", kernel pointers printed using the %pK format specifier will be replaced with 0's unless the user has CAP_SYSLOG. When kptr_restrict is set to "2", kernel pointers printed using %pK will be replaced with 0's regardless of privileges. Change-Id: Iacd8f7b7cdafed3a111507d3da899be9261ff09f Signed-off-by: Dibyendu Roy <dibyen@codeaurora.org>
-rw-r--r--drivers/bluetooth/hci_h4.c8
-rw-r--r--drivers/bluetooth/hci_ldisc.c12
-rw-r--r--net/bluetooth/af_bluetooth.c18
-rw-r--r--net/bluetooth/bnep/core.c2
-rw-r--r--net/bluetooth/bnep/netdev.c4
-rw-r--r--net/bluetooth/bnep/sock.c4
-rw-r--r--net/bluetooth/cmtp/capi.c31
-rw-r--r--net/bluetooth/cmtp/core.c10
-rw-r--r--net/bluetooth/cmtp/sock.c4
-rw-r--r--net/bluetooth/hci_conn.c42
-rw-r--r--net/bluetooth/hci_core.c50
-rw-r--r--net/bluetooth/hci_event.c8
-rw-r--r--net/bluetooth/hci_sock.c20
-rw-r--r--net/bluetooth/hci_sysfs.c4
-rw-r--r--net/bluetooth/hidp/core.c21
-rw-r--r--net/bluetooth/hidp/sock.c4
-rw-r--r--net/bluetooth/l2cap_core.c191
-rw-r--r--net/bluetooth/l2cap_sock.c44
-rw-r--r--net/bluetooth/lib.c8
-rw-r--r--net/bluetooth/mgmt.c14
-rw-r--r--net/bluetooth/rfcomm/core.c130
-rw-r--r--net/bluetooth/rfcomm/sock.c47
-rw-r--r--net/bluetooth/rfcomm/tty.c48
-rw-r--r--net/bluetooth/sco.c64
-rw-r--r--net/bluetooth/smp.c50
25 files changed, 421 insertions, 417 deletions
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index a6fce48da0fb..820a82415bc1 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -57,7 +57,7 @@ static int h4_open(struct hci_uart *hu)
{
struct h4_struct *h4;
- BT_DBG("hu %p", hu);
+ BT_DBG("hu %pK", hu);
h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
if (!h4)
@@ -74,7 +74,7 @@ static int h4_flush(struct hci_uart *hu)
{
struct h4_struct *h4 = hu->priv;
- BT_DBG("hu %p", hu);
+ BT_DBG("hu %pK", hu);
skb_queue_purge(&h4->txq);
@@ -88,7 +88,7 @@ static int h4_close(struct hci_uart *hu)
hu->priv = NULL;
- BT_DBG("hu %p", hu);
+ BT_DBG("hu %pK", hu);
skb_queue_purge(&h4->txq);
@@ -105,7 +105,7 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
{
struct h4_struct *h4 = hu->priv;
- BT_DBG("hu %p skb %p", hu, skb);
+ BT_DBG("hu %pK skb %pK", hu, skb);
/* Prepend skb with frame type */
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 15e75c9d806a..85bb31b6052d 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -159,7 +159,7 @@ static void hci_uart_write_work(struct work_struct *work)
struct hci_dev *hdev = hu->hdev;
struct sk_buff *skb;
- BT_DBG("hu %p hdev %p tty %p", hu, hdev, tty);
+ BT_DBG("hu %pK hdev %pK tty %pK", hu, hdev, tty);
/* REVISIT: should we cope with bad skbs or ->write() returning
* and error value ?
@@ -224,7 +224,7 @@ int hci_uart_init_ready(struct hci_uart *hu)
/* Initialize device */
static int hci_uart_open(struct hci_dev *hdev)
{
- BT_DBG("%s %p", hdev->name, hdev);
+ BT_DBG("%s %pK", hdev->name, hdev);
/* Nothing to do for UART driver */
return 0;
@@ -236,7 +236,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
struct hci_uart *hu = hci_get_drvdata(hdev);
struct tty_struct *tty = hu->tty;
- BT_DBG("hdev %p tty %p", hdev, tty);
+ BT_DBG("hdev %pK tty %pK", hdev, tty);
if (hu->tx_skb) {
kfree_skb(hu->tx_skb); hu->tx_skb = NULL;
@@ -255,7 +255,7 @@ static int hci_uart_flush(struct hci_dev *hdev)
/* Close device */
static int hci_uart_close(struct hci_dev *hdev)
{
- BT_DBG("hdev %p", hdev);
+ BT_DBG("hdev %pK", hdev);
hci_uart_flush(hdev);
hdev->flush = NULL;
@@ -460,7 +460,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)
{
struct hci_uart *hu;
- BT_DBG("tty %p", tty);
+ BT_DBG("tty %pK", tty);
/* Error if the tty has no write op instead of leaving an exploitable
hole */
@@ -505,7 +505,7 @@ static void hci_uart_tty_close(struct tty_struct *tty)
struct hci_uart *hu = tty->disc_data;
struct hci_dev *hdev;
- BT_DBG("tty %p", tty);
+ BT_DBG("tty %pK", tty);
/* Detach from the tty */
tty->disc_data = NULL;
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 709ce9fb15f3..5edc3212fb2a 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -183,7 +183,7 @@ EXPORT_SYMBOL(bt_sock_unlink);
void bt_accept_enqueue(struct sock *parent, struct sock *sk)
{
- BT_DBG("parent %p, sk %p", parent, sk);
+ BT_DBG("parent %pK, sk %pK", parent, sk);
sock_hold(sk);
list_add_tail(&bt_sk(sk)->accept_q, &bt_sk(parent)->accept_q);
@@ -194,7 +194,7 @@ EXPORT_SYMBOL(bt_accept_enqueue);
void bt_accept_unlink(struct sock *sk)
{
- BT_DBG("sk %p state %d", sk, sk->sk_state);
+ BT_DBG("sk %pK state %d", sk, sk->sk_state);
list_del_init(&bt_sk(sk)->accept_q);
bt_sk(sk)->parent->sk_ack_backlog--;
@@ -208,7 +208,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
struct list_head *p, *n;
struct sock *sk;
- BT_DBG("parent %p", parent);
+ BT_DBG("parent %pK", parent);
list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
@@ -248,7 +248,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
size_t copied;
int err;
- BT_DBG("sock %p sk %p len %zu", sock, sk, len);
+ BT_DBG("sock %pK sk %pK len %zu", sock, sk, len);
if (flags & MSG_OOB)
return -EOPNOTSUPP;
@@ -323,7 +323,7 @@ int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
if (flags & MSG_OOB)
return -EOPNOTSUPP;
- BT_DBG("sk %p size %zu", sk, size);
+ BT_DBG("sk %pK size %zu", sk, size);
lock_sock(sk);
@@ -439,7 +439,7 @@ unsigned int bt_sock_poll(struct file *file, struct socket *sock,
struct sock *sk = sock->sk;
unsigned int mask = 0;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
poll_wait(file, sk_sleep(sk), wait);
@@ -483,7 +483,7 @@ int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
long amount;
int err;
- BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
+ BT_DBG("sk %pK cmd %x arg %lx", sk, cmd, arg);
switch (cmd) {
case TIOCOUTQ:
@@ -530,7 +530,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
DECLARE_WAITQUEUE(wait, current);
int err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
add_wait_queue(sk_sleep(sk), &wait);
set_current_state(TASK_INTERRUPTIBLE);
@@ -567,7 +567,7 @@ int bt_sock_wait_ready(struct sock *sk, unsigned long flags)
unsigned long timeo;
int err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 1641367e54ca..abeccb56fbbd 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -427,7 +427,7 @@ static int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
int len = 0, il = 0;
u8 type = 0;
- BT_DBG("skb %p dev %p type %d", skb, skb->dev, skb->pkt_type);
+ BT_DBG("skb %pK dev %pK type %d", skb, skb->dev, skb->pkt_type);
if (!skb->dev) {
/* Control frame sent by us */
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index 6ceb5d36a32b..f03713cd57e8 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -156,7 +156,7 @@ static int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session *s)
return 0;
}
- BT_DBG("BNEP: filtered skb %p, proto 0x%.4x", skb, proto);
+ BT_DBG("BNEP: filtered skb %pK, proto 0x%.4x", skb, proto);
return 1;
}
#endif
@@ -167,7 +167,7 @@ static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
struct bnep_session *s = netdev_priv(dev);
struct sock *sk = s->sock->sk;
- BT_DBG("skb %p, dev %p", skb, dev);
+ BT_DBG("skb %pK, dev %pK", skb, dev);
#ifdef CONFIG_BT_BNEP_MC_FILTER
if (bnep_net_mc_filter(skb, s)) {
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index b5116fa9835e..5d1ec04e508a 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -37,7 +37,7 @@ static int bnep_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (!sk)
return 0;
@@ -197,7 +197,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c
index 9a50338772f3..c1cc231fe148 100644
--- a/net/bluetooth/cmtp/capi.c
+++ b/net/bluetooth/cmtp/capi.c
@@ -74,7 +74,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *sessio
{
struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL);
- BT_DBG("session %p application %p appl %d", session, app, appl);
+ BT_DBG("session %pK application %pK appl %d", session, app, appl);
if (!app)
return NULL;
@@ -89,7 +89,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *sessio
static void cmtp_application_del(struct cmtp_session *session, struct cmtp_application *app)
{
- BT_DBG("session %p application %p", session, app);
+ BT_DBG("session %pK application %pK", session, app);
if (app) {
list_del(&app->list);
@@ -137,7 +137,7 @@ static void cmtp_send_capimsg(struct cmtp_session *session, struct sk_buff *skb)
{
struct cmtp_scb *scb = (void *) skb->cb;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
scb->id = -1;
scb->data = (CAPIMSG_COMMAND(skb->data) == CAPI_DATA_B3);
@@ -154,7 +154,8 @@ static void cmtp_send_interopmsg(struct cmtp_session *session,
struct sk_buff *skb;
unsigned char *s;
- BT_DBG("session %p subcmd 0x%02x appl %d msgnum %d", session, subcmd, appl, msgnum);
+ BT_DBG("session %pK subcmd 0x%02x appl %d msgnum %d",
+ session, subcmd, appl, msgnum);
skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC);
if (!skb) {
@@ -190,7 +191,7 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s
__u16 appl, msgnum, func, info;
__u32 controller;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
switch (CAPIMSG_SUBCOMMAND(skb->data)) {
case CAPI_CONF:
@@ -323,7 +324,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)
__u16 appl;
__u32 contr;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
if (skb->len < CAPI_MSG_BASELEN)
return;
@@ -361,7 +362,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)
static int cmtp_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
{
- BT_DBG("ctrl %p data %p", ctrl, data);
+ BT_DBG("ctrl %pK data %pK", ctrl, data);
return 0;
}
@@ -370,7 +371,7 @@ static void cmtp_reset_ctr(struct capi_ctr *ctrl)
{
struct cmtp_session *session = ctrl->driverdata;
- BT_DBG("ctrl %p", ctrl);
+ BT_DBG("ctrl %pK", ctrl);
capi_ctr_down(ctrl);
@@ -387,8 +388,8 @@ static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_
unsigned char buf[8];
int err = 0, nconn, want = rp->level3cnt;
- BT_DBG("ctrl %p appl %d level3cnt %d datablkcnt %d datablklen %d",
- ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen);
+ BT_DBG("ctrl %pK appl %d level3cnt %d datablkcnt %d datablklen %d",
+ ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen);
application = cmtp_application_add(session, appl);
if (!application) {
@@ -452,7 +453,7 @@ static void cmtp_release_appl(struct capi_ctr *ctrl, __u16 appl)
struct cmtp_session *session = ctrl->driverdata;
struct cmtp_application *application;
- BT_DBG("ctrl %p appl %d", ctrl, appl);
+ BT_DBG("ctrl %pK appl %d", ctrl, appl);
application = cmtp_application_get(session, CMTP_APPLID, appl);
if (!application) {
@@ -478,7 +479,7 @@ static u16 cmtp_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
__u16 appl;
__u32 contr;
- BT_DBG("ctrl %p skb %p", ctrl, skb);
+ BT_DBG("ctrl %pK skb %pK", ctrl, skb);
appl = CAPIMSG_APPID(skb->data);
contr = CAPIMSG_CONTROL(skb->data);
@@ -543,7 +544,7 @@ int cmtp_attach_device(struct cmtp_session *session)
unsigned char buf[4];
long ret;
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
capimsg_setu32(buf, 0, 0);
@@ -585,7 +586,7 @@ int cmtp_attach_device(struct cmtp_session *session)
session->num = session->ctrl.cnr;
- BT_DBG("session %p num %d", session, session->num);
+ BT_DBG("session %pK num %d", session, session->num);
capimsg_setu32(buf, 0, 1);
@@ -606,7 +607,7 @@ int cmtp_attach_device(struct cmtp_session *session)
void cmtp_detach_device(struct cmtp_session *session)
{
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
detach_capi_ctr(&session->ctrl);
}
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index 298ed37010e6..011747337858 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -109,7 +109,7 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const
struct sk_buff *skb = session->reassembly[id], *nskb;
int size;
- BT_DBG("session %p buf %p count %d", session, buf, count);
+ BT_DBG("session %pK buf %pK count %d", session, buf, count);
size = (skb) ? skb->len + count : count;
@@ -134,7 +134,7 @@ static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *
__u8 hdr, hdrlen, id;
__u16 len;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
while (skb->len > 0) {
hdr = skb->data[0];
@@ -197,7 +197,7 @@ static int cmtp_send_frame(struct cmtp_session *session, unsigned char *data, in
struct kvec iv = { data, len };
struct msghdr msg;
- BT_DBG("session %p data %p len %d", session, data, len);
+ BT_DBG("session %pK data %pK len %d", session, data, len);
if (!len)
return 0;
@@ -213,7 +213,7 @@ static void cmtp_process_transmit(struct cmtp_session *session)
unsigned char *hdr;
unsigned int size, tail;
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
nskb = alloc_skb(session->mtu, GFP_ATOMIC);
if (!nskb) {
@@ -283,7 +283,7 @@ static int cmtp_session(void *arg)
struct sk_buff *skb;
wait_queue_t wait;
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
set_user_nice(current, -15);
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index ce86a7bae844..e91ce530ed05 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -50,7 +50,7 @@ static int cmtp_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (!sk)
return 0;
@@ -200,7 +200,7 @@ static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 85b82f7adbd2..3e0ab381c4e2 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -141,7 +141,7 @@ static void le_scan_cleanup(struct work_struct *work)
struct hci_dev *hdev = conn->hdev;
struct hci_conn *c = NULL;
- BT_DBG("%s hcon %p", hdev->name, conn);
+ BT_DBG("%s hcon %pK", hdev->name, conn);
hci_dev_lock(hdev);
@@ -165,7 +165,7 @@ static void le_scan_cleanup(struct work_struct *work)
static void hci_connect_le_scan_remove(struct hci_conn *conn)
{
- BT_DBG("%s hcon %p", conn->hdev->name, conn);
+ BT_DBG("%s hcon %pK", conn->hdev->name, conn);
/* We can't call hci_conn_del/hci_conn_cleanup here since that
* could deadlock with another hci_conn_del() call that's holding
@@ -187,7 +187,7 @@ static void hci_acl_create_connection(struct hci_conn *conn)
struct inquiry_entry *ie;
struct hci_cp_create_conn cp;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
conn->state = BT_CONNECT;
conn->out = true;
@@ -226,7 +226,7 @@ static void hci_acl_create_connection(struct hci_conn *conn)
int hci_disconnect(struct hci_conn *conn, __u8 reason)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
/* When we are master of an established connection and it enters
* the disconnect timeout, then go ahead and try to read the
@@ -251,7 +251,7 @@ static void hci_add_sco(struct hci_conn *conn, __u16 handle)
struct hci_dev *hdev = conn->hdev;
struct hci_cp_add_sco cp;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
conn->state = BT_CONNECT;
conn->out = true;
@@ -270,7 +270,7 @@ bool hci_setup_sync(struct hci_conn *conn, __u16 handle)
struct hci_cp_setup_sync_conn cp;
const struct sco_param *param;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
conn->state = BT_CONNECT;
conn->out = true;
@@ -356,7 +356,7 @@ void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand,
struct hci_dev *hdev = conn->hdev;
struct hci_cp_le_start_enc cp;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
memset(&cp, 0, sizeof(cp));
@@ -376,7 +376,7 @@ void hci_sco_setup(struct hci_conn *conn, __u8 status)
if (!sco)
return;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
if (!status) {
if (lmp_esco_capable(conn->hdev))
@@ -395,7 +395,7 @@ static void hci_conn_timeout(struct work_struct *work)
disc_work.work);
int refcnt = atomic_read(&conn->refcnt);
- BT_DBG("hcon %p state %s", conn, state_to_string(conn->state));
+ BT_DBG("hcon %pK state %s", conn, state_to_string(conn->state));
WARN_ON(refcnt < 0);
@@ -426,7 +426,7 @@ static void hci_conn_idle(struct work_struct *work)
idle_work.work);
struct hci_dev *hdev = conn->hdev;
- BT_DBG("hcon %p mode %d", conn, conn->mode);
+ BT_DBG("hcon %pK mode %d", conn, conn->mode);
if (!lmp_sniff_capable(hdev) || !lmp_sniff_capable(conn))
return;
@@ -566,7 +566,7 @@ int hci_conn_del(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
- BT_DBG("%s hcon %p handle %d", hdev->name, conn, conn->handle);
+ BT_DBG("%s hcon %pK handle %d", hdev->name, conn, conn->handle);
cancel_delayed_work_sync(&conn->disc_work);
cancel_delayed_work_sync(&conn->auto_accept_work);
@@ -1143,7 +1143,7 @@ struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,
/* Check link security requirement */
int hci_conn_check_link_mode(struct hci_conn *conn)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
/* In Secure Connections Only mode, it is required that Secure
* Connections is used and the link is encrypted with AES-CCM
@@ -1166,7 +1166,7 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
/* Authenticate remote device */
static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
if (conn->pending_sec_level > sec_level)
sec_level = conn->pending_sec_level;
@@ -1203,7 +1203,7 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
/* Encrypt the the link */
static void hci_conn_encrypt(struct hci_conn *conn)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
if (!test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags)) {
struct hci_cp_set_conn_encrypt cp;
@@ -1218,7 +1218,7 @@ static void hci_conn_encrypt(struct hci_conn *conn)
int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type,
bool initiator)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
if (conn->type == LE_LINK)
return smp_conn_security(conn, sec_level);
@@ -1287,7 +1287,7 @@ EXPORT_SYMBOL(hci_conn_security);
/* Check secure link requirement */
int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
/* Accept if non-secure or higher security level is required */
if (sec_level != BT_SECURITY_HIGH && sec_level != BT_SECURITY_FIPS)
@@ -1306,7 +1306,7 @@ EXPORT_SYMBOL(hci_conn_check_secure);
/* Switch role */
int hci_conn_switch_role(struct hci_conn *conn, __u8 role)
{
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
if (role == conn->role)
return 1;
@@ -1327,7 +1327,7 @@ void hci_conn_enter_active_mode(struct hci_conn *conn, __u8 force_active)
{
struct hci_dev *hdev = conn->hdev;
- BT_DBG("hcon %p mode %d", conn, conn->mode);
+ BT_DBG("hcon %pK mode %d", conn, conn->mode);
if (conn->mode != HCI_CM_SNIFF)
goto timer;
@@ -1507,7 +1507,7 @@ struct hci_chan *hci_chan_create(struct hci_conn *conn)
struct hci_dev *hdev = conn->hdev;
struct hci_chan *chan;
- BT_DBG("%s hcon %p", hdev->name, conn);
+ BT_DBG("%s hcon %pK", hdev->name, conn);
if (test_bit(HCI_CONN_DROP, &conn->flags)) {
BT_DBG("Refusing to create new hci_chan");
@@ -1532,7 +1532,7 @@ void hci_chan_del(struct hci_chan *chan)
struct hci_conn *conn = chan->conn;
struct hci_dev *hdev = conn->hdev;
- BT_DBG("%s hcon %p chan %p", hdev->name, conn, chan);
+ BT_DBG("%s hcon %pK chan %pK", hdev->name, conn, chan);
list_del_rcu(&chan->list);
@@ -1551,7 +1551,7 @@ void hci_chan_list_flush(struct hci_conn *conn)
{
struct hci_chan *chan, *n;
- BT_DBG("hcon %p", conn);
+ BT_DBG("hcon %pK", conn);
list_for_each_entry_safe(chan, n, &conn->chan_list, list)
hci_chan_del(chan);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 62edbf1b114e..da4078651c22 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1131,7 +1131,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
struct discovery_state *cache = &hdev->discovery;
struct inquiry_entry *e;
- BT_DBG("cache %p, %pMR", cache, bdaddr);
+ BT_DBG("cache %pK, %pMR", cache, bdaddr);
list_for_each_entry(e, &cache->all, all) {
if (!bacmp(&e->data.bdaddr, bdaddr))
@@ -1147,7 +1147,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev,
struct discovery_state *cache = &hdev->discovery;
struct inquiry_entry *e;
- BT_DBG("cache %p, %pMR", cache, bdaddr);
+ BT_DBG("cache %pK, %pMR", cache, bdaddr);
list_for_each_entry(e, &cache->unknown, list) {
if (!bacmp(&e->data.bdaddr, bdaddr))
@@ -1164,7 +1164,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev,
struct discovery_state *cache = &hdev->discovery;
struct inquiry_entry *e;
- BT_DBG("cache %p bdaddr %pMR state %d", cache, bdaddr, state);
+ BT_DBG("cache %pK bdaddr %pMR state %d", cache, bdaddr, state);
list_for_each_entry(e, &cache->resolve, list) {
if (!bacmp(bdaddr, BDADDR_ANY) && e->name_state == state)
@@ -1202,7 +1202,7 @@ u32 hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
struct inquiry_entry *ie;
u32 flags = 0;
- BT_DBG("cache %p, %pMR", cache, &data->bdaddr);
+ BT_DBG("cache %pK, %pMR", cache, &data->bdaddr);
hci_remove_remote_oob_data(hdev, &data->bdaddr, BDADDR_BREDR);
@@ -1281,7 +1281,7 @@ static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf)
copied++;
}
- BT_DBG("cache %p, copied %d", cache, copied);
+ BT_DBG("cache %pK, copied %d", cache, copied);
return copied;
}
@@ -1402,7 +1402,7 @@ static int hci_dev_do_open(struct hci_dev *hdev)
{
int ret = 0;
- BT_DBG("%s %p", hdev->name, hdev);
+ BT_DBG("%s %pK", hdev->name, hdev);
hci_req_lock(hdev);
@@ -1639,7 +1639,7 @@ int hci_dev_do_close(struct hci_dev *hdev)
{
bool auto_off;
- BT_DBG("%s %p", hdev->name, hdev);
+ BT_DBG("%s %pK", hdev->name, hdev);
if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
@@ -1788,7 +1788,7 @@ static int hci_dev_do_reset(struct hci_dev *hdev)
{
int ret;
- BT_DBG("%s %p", hdev->name, hdev);
+ BT_DBG("%s %pK", hdev->name, hdev);
hci_req_lock(hdev);
@@ -2122,7 +2122,7 @@ static int hci_rfkill_set_block(void *data, bool blocked)
{
struct hci_dev *hdev = data;
- BT_DBG("%p name %s blocked %d", hdev, hdev->name, blocked);
+ BT_DBG("%pK name %s blocked %d", hdev, hdev->name, blocked);
if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL))
return -EBUSY;
@@ -3353,7 +3353,7 @@ int hci_register_dev(struct hci_dev *hdev)
sprintf(hdev->name, "hci%d", id);
hdev->id = id;
- BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
+ BT_DBG("%pK name %s bus %d", hdev, hdev->name, hdev->bus);
hdev->workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND |
WQ_MEM_RECLAIM, 1, hdev->name);
@@ -3434,7 +3434,7 @@ void hci_unregister_dev(struct hci_dev *hdev)
{
int id;
- BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
+ BT_DBG("%pK name %s bus %d", hdev, hdev->name, hdev->bus);
hci_dev_set_flag(hdev, HCI_UNREGISTER);
@@ -3577,7 +3577,7 @@ EXPORT_SYMBOL(hci_recv_diag);
int hci_register_cb(struct hci_cb *cb)
{
- BT_DBG("%p name %s", cb, cb->name);
+ BT_DBG("%pK name %s", cb, cb->name);
mutex_lock(&hci_cb_list_lock);
list_add_tail(&cb->list, &hci_cb_list);
@@ -3589,7 +3589,7 @@ EXPORT_SYMBOL(hci_register_cb);
int hci_unregister_cb(struct hci_cb *cb)
{
- BT_DBG("%p name %s", cb, cb->name);
+ BT_DBG("%pK name %s", cb, cb->name);
mutex_lock(&hci_cb_list_lock);
list_del(&cb->list);
@@ -3733,12 +3733,12 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
list = skb_shinfo(skb)->frag_list;
if (!list) {
/* Non fragmented */
- BT_DBG("%s nonfrag skb %p len %d", hdev->name, skb, skb->len);
+ BT_DBG("%s nonfrag skb %pK len %d", hdev->name, skb, skb->len);
skb_queue_tail(queue, skb);
} else {
/* Fragmented */
- BT_DBG("%s frag %p len %d", hdev->name, skb, skb->len);
+ BT_DBG("%s frag %pK len %d", hdev->name, skb, skb->len);
skb_shinfo(skb)->frag_list = NULL;
@@ -3759,7 +3759,7 @@ static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
bt_cb(skb)->pkt_type = HCI_ACLDATA_PKT;
hci_add_acl_hdr(skb, conn->handle, flags);
- BT_DBG("%s frag %p len %d", hdev->name, skb, skb->len);
+ BT_DBG("%s frag %pK len %d", hdev->name, skb, skb->len);
__skb_queue_tail(queue, skb);
} while (list);
@@ -3772,7 +3772,7 @@ void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags)
{
struct hci_dev *hdev = chan->conn->hdev;
- BT_DBG("%s chan %p flags 0x%4.4x", hdev->name, chan, flags);
+ BT_DBG("%s chan %pK flags 0x%4.4x", hdev->name, chan, flags);
hci_queue_acl(chan, &chan->data_q, skb, flags);
@@ -3859,7 +3859,7 @@ static struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,
} else
*quote = 0;
- BT_DBG("conn %p quote %d", conn, *quote);
+ BT_DBG("conn %pK quote %d", conn, *quote);
return conn;
}
@@ -3962,7 +3962,7 @@ static struct hci_chan *hci_chan_sent(struct hci_dev *hdev, __u8 type,
q = cnt / num;
*quote = q ? q : 1;
- BT_DBG("chan %p quote %d", chan, *quote);
+ BT_DBG("chan %pK quote %d", chan, *quote);
return chan;
}
@@ -4004,7 +4004,7 @@ static void hci_prio_recalculate(struct hci_dev *hdev, __u8 type)
skb->priority = HCI_PRIO_MAX - 1;
- BT_DBG("chan %p skb %p promoted to %d", chan, skb,
+ BT_DBG("chan %pK skb %pK promoted to %d", chan, skb,
skb->priority);
}
@@ -4046,7 +4046,7 @@ static void hci_sched_acl_pkt(struct hci_dev *hdev)
(chan = hci_chan_sent(hdev, ACL_LINK, &quote))) {
u32 priority = (skb_peek(&chan->data_q))->priority;
while (quote-- && (skb = skb_peek(&chan->data_q))) {
- BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
+ BT_DBG("chan %pK skb %pK len %d priority %u", chan, skb,
skb->len, skb->priority);
/* Stop if priority has changed */
@@ -4094,7 +4094,7 @@ static void hci_sched_acl_blk(struct hci_dev *hdev)
while (quote > 0 && (skb = skb_peek(&chan->data_q))) {
int blocks;
- BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
+ BT_DBG("chan %pK skb %pK len %d priority %u", chan, skb,
skb->len, skb->priority);
/* Stop if priority has changed */
@@ -4162,7 +4162,7 @@ static void hci_sched_sco(struct hci_dev *hdev)
while (hdev->sco_cnt && (conn = hci_low_sent(hdev, SCO_LINK, &quote))) {
while (quote-- && (skb = skb_dequeue(&conn->data_q))) {
- BT_DBG("skb %p len %d", skb, skb->len);
+ BT_DBG("skb %pK len %d", skb, skb->len);
hci_send_frame(hdev, skb);
conn->sent++;
@@ -4186,7 +4186,7 @@ static void hci_sched_esco(struct hci_dev *hdev)
while (hdev->sco_cnt && (conn = hci_low_sent(hdev, ESCO_LINK,
&quote))) {
while (quote-- && (skb = skb_dequeue(&conn->data_q))) {
- BT_DBG("skb %p len %d", skb, skb->len);
+ BT_DBG("skb %pK len %d", skb, skb->len);
hci_send_frame(hdev, skb);
conn->sent++;
@@ -4220,7 +4220,7 @@ static void hci_sched_le(struct hci_dev *hdev)
while (cnt && (chan = hci_chan_sent(hdev, LE_LINK, &quote))) {
u32 priority = (skb_peek(&chan->data_q))->priority;
while (quote-- && (skb = skb_peek(&chan->data_q))) {
- BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
+ BT_DBG("chan %pK skb %pK len %d priority %u", chan, skb,
skb->len, skb->priority);
/* Stop if priority has changed */
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d57c11c1c6b5..0e5bf7e61603 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1469,7 +1469,7 @@ static void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr);
- BT_DBG("%s bdaddr %pMR hcon %p", hdev->name, &cp->bdaddr, conn);
+ BT_DBG("%s bdaddr %pMR hcon %pK", hdev->name, &cp->bdaddr, conn);
if (status) {
if (conn && conn->state == BT_CONNECT) {
@@ -3235,7 +3235,7 @@ static void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *skb)
break;
default:
- BT_ERR("Unknown type %d conn %p", conn->type, conn);
+ BT_ERR("Unknown type %d conn %pK", conn->type, conn);
break;
}
}
@@ -3306,7 +3306,7 @@ static void hci_num_comp_blocks_evt(struct hci_dev *hdev, struct sk_buff *skb)
break;
default:
- BT_ERR("Unknown type %d conn %p", conn->type, conn);
+ BT_ERR("Unknown type %d conn %pK", conn->type, conn);
break;
}
}
@@ -4381,7 +4381,7 @@ static void hci_loglink_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
hchan->handle = le16_to_cpu(ev->handle);
- BT_DBG("hcon %p mgr %p hchan %p", hcon, hcon->amp_mgr, hchan);
+ BT_DBG("hcon %pK mgr %pK hchan %pK", hcon, hcon->amp_mgr, hchan);
mgr = hcon->amp_mgr;
if (mgr && mgr->bredr_chan) {
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index b1eb8c09a660..87fd1a07326b 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -155,7 +155,7 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb)
struct sock *sk;
struct sk_buff *skb_copy = NULL;
- BT_DBG("hdev %p len %d", hdev, skb->len);
+ BT_DBG("hdev %pK len %d", hdev, skb->len);
read_lock(&hci_sk_list.lock);
@@ -260,7 +260,7 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb)
if (!atomic_read(&monitor_promisc))
return;
- BT_DBG("hdev %p len %d", hdev, skb->len);
+ BT_DBG("hdev %pK len %d", hdev, skb->len);
switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
@@ -553,7 +553,7 @@ static int hci_sock_release(struct socket *sock)
struct sock *sk = sock->sk;
struct hci_dev *hdev;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (!sk)
return 0;
@@ -753,7 +753,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
struct hci_dev *hdev = NULL;
int len, err = 0;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (!addr)
return -EINVAL;
@@ -931,7 +931,7 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
struct hci_dev *hdev;
int err = 0;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (peer)
return -EOPNOTSUPP;
@@ -999,7 +999,7 @@ static int hci_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
struct sk_buff *skb;
int copied, err;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (flags & MSG_OOB)
return -EOPNOTSUPP;
@@ -1159,7 +1159,7 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
struct sk_buff *skb;
int err;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (msg->msg_flags & MSG_OOB)
return -EOPNOTSUPP;
@@ -1288,7 +1288,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
struct sock *sk = sock->sk;
int err = 0, opt = 0;
- BT_DBG("sk %p, opt %d", sk, optname);
+ BT_DBG("sk %pK, opt %d", sk, optname);
lock_sock(sk);
@@ -1371,7 +1371,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname,
struct sock *sk = sock->sk;
int len, opt, err = 0;
- BT_DBG("sk %p, opt %d", sk, optname);
+ BT_DBG("sk %pK, opt %d", sk, optname);
if (get_user(len, optlen))
return -EFAULT;
@@ -1461,7 +1461,7 @@ static int hci_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 555982a78a58..4f78b28686ff 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -77,7 +77,7 @@ void hci_conn_init_sysfs(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
conn->dev.type = &bt_link;
conn->dev.class = bt_class;
@@ -90,7 +90,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 0bec4588c3c8..f02ffe558a08 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -101,7 +101,7 @@ static int hidp_send_message(struct hidp_session *session, struct socket *sock,
struct sk_buff *skb;
struct sock *sk = sock->sk;
- BT_DBG("session %p data %p size %d", session, data, size);
+ BT_DBG("session %pK data %pK size %d", session, data, size);
if (atomic_read(&session->terminate))
return -EIO;
@@ -145,7 +145,7 @@ static int hidp_input_event(struct input_dev *dev, unsigned int type,
unsigned char newleds;
unsigned char hdr, data[2];
- BT_DBG("session %p type %d code %d value %d",
+ BT_DBG("session %pK type %d code %d value %d",
session, type, code, value);
if (type != EV_LED)
@@ -443,7 +443,7 @@ static void hidp_process_report(struct hidp_session *session,
static void hidp_process_handshake(struct hidp_session *session,
unsigned char param)
{
- BT_DBG("session %p param 0x%02x", session, param);
+ BT_DBG("session %pK param 0x%02x", session, param);
session->output_report_success = 0; /* default condition */
switch (param) {
@@ -486,7 +486,7 @@ static void hidp_process_handshake(struct hidp_session *session,
static void hidp_process_hid_control(struct hidp_session *session,
unsigned char param)
{
- BT_DBG("session %p param 0x%02x", session, param);
+ BT_DBG("session %pK param 0x%02x", session, param);
if (param == HIDP_CTRL_VIRTUAL_CABLE_UNPLUG) {
/* Flush the transmit queues */
@@ -502,7 +502,8 @@ static int hidp_process_data(struct hidp_session *session, struct sk_buff *skb,
unsigned char param)
{
int done_with_skb = 1;
- BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param);
+ BT_DBG("session %pK skb %pK len %d param 0x%02x",
+ session, skb, skb->len, param);
switch (param) {
case HIDP_DATA_RTYPE_INPUT:
@@ -547,7 +548,7 @@ static void hidp_recv_ctrl_frame(struct hidp_session *session,
unsigned char hdr, type, param;
int free_skb = 1;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
hdr = skb->data[0];
skb_pull(skb, 1);
@@ -583,7 +584,7 @@ static void hidp_recv_intr_frame(struct hidp_session *session,
{
unsigned char hdr;
- BT_DBG("session %p skb %p len %d", session, skb, skb->len);
+ BT_DBG("session %pK skb %pK len %d", session, skb, skb->len);
hdr = skb->data[0];
skb_pull(skb, 1);
@@ -611,7 +612,7 @@ static int hidp_send_frame(struct socket *sock, unsigned char *data, int len)
struct kvec iv = { data, len };
struct msghdr msg;
- BT_DBG("sock %p data %p len %d", sock, data, len);
+ BT_DBG("sock %pK data %pK len %d", sock, data, len);
if (!len)
return 0;
@@ -629,7 +630,7 @@ static void hidp_process_transmit(struct hidp_session *session,
struct sk_buff *skb;
int ret;
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
while ((skb = skb_dequeue(transmit))) {
ret = hidp_send_frame(sock, skb->data, skb->len);
@@ -1246,7 +1247,7 @@ static int hidp_session_thread(void *arg)
struct hidp_session *session = arg;
wait_queue_t ctrl_wait, intr_wait;
- BT_DBG("session %p", session);
+ BT_DBG("session %pK", session);
/* initialize runtime environment */
hidp_session_get(session);
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
index 008ba439bd62..c06f9a0107d6 100644
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
@@ -33,7 +33,7 @@ static int hidp_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
- BT_DBG("sock %p sk %p", sock, sk);
+ BT_DBG("sock %pK sk %pK", sock, sk);
if (!sk)
return 0;
@@ -230,7 +230,7 @@ static int hidp_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 66e8b6ee19a5..bd5937dc6fe9 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -249,7 +249,7 @@ static u16 l2cap_alloc_cid(struct l2cap_conn *conn)
static void l2cap_state_change(struct l2cap_chan *chan, int state)
{
- BT_DBG("chan %p %s -> %s", chan, state_to_string(chan->state),
+ BT_DBG("chan %pK %s -> %s", chan, state_to_string(chan->state),
state_to_string(state));
chan->state = state;
@@ -400,7 +400,7 @@ static void l2cap_chan_timeout(struct work_struct *work)
struct l2cap_conn *conn = chan->conn;
int reason;
- BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
+ BT_DBG("chan %pK state %s", chan, state_to_string(chan->state));
mutex_lock(&conn->chan_lock);
l2cap_chan_lock(chan);
@@ -449,7 +449,7 @@ struct l2cap_chan *l2cap_chan_create(void)
/* This flag is cleared in l2cap_chan_ready() */
set_bit(CONF_NOT_COMPLETE, &chan->conf_state);
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
return chan;
}
@@ -459,7 +459,7 @@ static void l2cap_chan_destroy(struct kref *kref)
{
struct l2cap_chan *chan = container_of(kref, struct l2cap_chan, kref);
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
write_lock(&chan_list_lock);
list_del(&chan->global_l);
@@ -470,14 +470,14 @@ static void l2cap_chan_destroy(struct kref *kref)
void l2cap_chan_hold(struct l2cap_chan *c)
{
- BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->kref.refcount));
+ BT_DBG("chan %pK orig refcnt %d", c, atomic_read(&c->kref.refcount));
kref_get(&c->kref);
}
void l2cap_chan_put(struct l2cap_chan *c)
{
- BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->kref.refcount));
+ BT_DBG("chan %pK orig refcnt %d", c, atomic_read(&c->kref.refcount));
kref_put(&c->kref, l2cap_chan_destroy);
}
@@ -516,7 +516,7 @@ static void l2cap_le_flowctl_init(struct l2cap_chan *chan)
void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
{
- BT_DBG("conn %p, psm 0x%2.2x, dcid 0x%4.4x", conn,
+ BT_DBG("conn %pK, psm 0x%2.2x, dcid 0x%4.4x", conn,
__le16_to_cpu(chan->psm), chan->dcid);
conn->disc_reason = HCI_ERROR_REMOTE_USER_TERM;
@@ -579,7 +579,7 @@ void l2cap_chan_del(struct l2cap_chan *chan, int err)
__clear_chan_timer(chan);
- BT_DBG("chan %p, conn %p, err %d, state %s", chan, conn, err,
+ BT_DBG("chan %pK, conn %pK, err %d, state %s", chan, conn, err,
state_to_string(chan->state));
chan->ops->teardown(chan, err);
@@ -608,7 +608,7 @@ void l2cap_chan_del(struct l2cap_chan *chan, int err)
if (chan->hs_hchan) {
struct hci_chan *hs_hchan = chan->hs_hchan;
- BT_DBG("chan %p disconnect hs_hchan %p", chan, hs_hchan);
+ BT_DBG("chan %pK disconnect hs_hchan %pK", chan, hs_hchan);
amp_disconnect_logical_link(hs_hchan);
}
@@ -711,7 +711,7 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason)
{
struct l2cap_conn *conn = chan->conn;
- BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
+ BT_DBG("chan %pK state %s", chan, state_to_string(chan->state));
switch (chan->state) {
case BT_LISTEN:
@@ -874,7 +874,7 @@ static void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb)
struct hci_conn *hcon = chan->conn->hcon;
u16 flags;
- BT_DBG("chan %p, skb %p len %d priority %u", chan, skb, skb->len,
+ BT_DBG("chan %pK, skb %pK len %d priority %u", chan, skb, skb->len,
skb->priority);
if (chan->hs_hcon && !__chan_is_moving(chan)) {
@@ -1061,7 +1061,7 @@ static void l2cap_send_sframe(struct l2cap_chan *chan,
struct sk_buff *skb;
u32 control_field;
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
if (!control->sframe)
return;
@@ -1100,7 +1100,7 @@ static void l2cap_send_rr_or_rnr(struct l2cap_chan *chan, bool poll)
{
struct l2cap_ctrl control;
- BT_DBG("chan %p, poll %d", chan, poll);
+ BT_DBG("chan %pK, poll %d", chan, poll);
memset(&control, 0, sizeof(control));
control.sframe = 1;
@@ -1189,7 +1189,7 @@ static void l2cap_move_setup(struct l2cap_chan *chan)
{
struct sk_buff *skb;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (chan->mode != L2CAP_MODE_ERTM)
return;
@@ -1223,7 +1223,7 @@ static void l2cap_move_setup(struct l2cap_chan *chan)
static void l2cap_move_done(struct l2cap_chan *chan)
{
u8 move_role = chan->move_role;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
chan->move_state = L2CAP_MOVE_STABLE;
chan->move_role = L2CAP_MOVE_ROLE_NONE;
@@ -1302,7 +1302,7 @@ static void l2cap_le_start(struct l2cap_chan *chan)
static void l2cap_start_connection(struct l2cap_chan *chan)
{
if (__amp_capable(chan)) {
- BT_DBG("chan %p AMP capable: discover AMPs", chan);
+ BT_DBG("chan %pK AMP capable: discover AMPs", chan);
a2mp_discover_amp(chan);
} else if (chan->conn->hcon->type == LE_LINK) {
l2cap_le_start(chan);
@@ -1399,7 +1399,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
{
struct l2cap_chan *chan, *tmp;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
mutex_lock(&conn->chan_lock);
@@ -1477,7 +1477,7 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn)
struct hci_conn *hcon = conn->hcon;
struct hci_dev *hdev = hcon->hdev;
- BT_DBG("%s conn %p", hdev->name, conn);
+ BT_DBG("%s conn %pK", hdev->name, conn);
/* For outgoing pairing which doesn't necessarily have an
* associated socket (e.g. mgmt_pair_device).
@@ -1510,7 +1510,7 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
struct l2cap_chan *chan;
struct hci_conn *hcon = conn->hcon;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
if (hcon->type == ACL_LINK)
l2cap_request_info(conn);
@@ -1551,7 +1551,7 @@ static void l2cap_conn_unreliable(struct l2cap_conn *conn, int err)
{
struct l2cap_chan *chan;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
mutex_lock(&conn->chan_lock);
@@ -1661,7 +1661,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
if (!conn)
return;
- BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
+ BT_DBG("hcon %pK conn %pK, err %d", hcon, conn, err);
kfree_skb(conn->rx_skb);
@@ -1789,7 +1789,7 @@ static void l2cap_monitor_timeout(struct work_struct *work)
struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
monitor_timer.work);
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
l2cap_chan_lock(chan);
@@ -1810,7 +1810,7 @@ static void l2cap_retrans_timeout(struct work_struct *work)
struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
retrans_timer.work);
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
l2cap_chan_lock(chan);
@@ -1831,7 +1831,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan,
struct sk_buff *skb;
struct l2cap_ctrl *control;
- BT_DBG("chan %p, skbs %p", chan, skbs);
+ BT_DBG("chan %pK, skbs %pK", chan, skbs);
if (__chan_is_moving(chan))
return;
@@ -1870,7 +1870,7 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
struct l2cap_ctrl *control;
int sent = 0;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (chan->state != BT_CONNECTED)
return -ENOTCONN;
@@ -1941,7 +1941,7 @@ static void l2cap_ertm_resend(struct l2cap_chan *chan)
struct sk_buff *tx_skb;
u16 seq;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (test_bit(CONN_REMOTE_BUSY, &chan->conn_state))
return;
@@ -2018,7 +2018,7 @@ static void l2cap_ertm_resend(struct l2cap_chan *chan)
static void l2cap_retransmit(struct l2cap_chan *chan,
struct l2cap_ctrl *control)
{
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
l2cap_seq_list_append(&chan->retrans_list, control->reqseq);
l2cap_ertm_resend(chan);
@@ -2029,7 +2029,7 @@ static void l2cap_retransmit_all(struct l2cap_chan *chan,
{
struct sk_buff *skb;
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
if (control->poll)
set_bit(CONN_SEND_FBIT, &chan->conn_state);
@@ -2065,7 +2065,7 @@ static void l2cap_send_ack(struct l2cap_chan *chan)
chan->last_acked_seq);
int threshold;
- BT_DBG("chan %p last_acked_seq %d buffer_seq %d",
+ BT_DBG("chan %pK last_acked_seq %d buffer_seq %d",
chan, chan->last_acked_seq, chan->buffer_seq);
memset(&control, 0, sizeof(control));
@@ -2160,7 +2160,7 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE;
struct l2cap_hdr *lh;
- BT_DBG("chan %p psm 0x%2.2x len %zu", chan,
+ BT_DBG("chan %pK psm 0x%2.2x len %zu", chan,
__le16_to_cpu(chan->psm), len);
count = min_t(unsigned int, (conn->mtu - hlen), len);
@@ -2192,7 +2192,7 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
int err, count;
struct l2cap_hdr *lh;
- BT_DBG("chan %p len %zu", chan, len);
+ BT_DBG("chan %pK len %zu", chan, len);
count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len);
@@ -2223,7 +2223,7 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan,
int err, count, hlen;
struct l2cap_hdr *lh;
- BT_DBG("chan %p len %zu", chan, len);
+ BT_DBG("chan %pK len %zu", chan, len);
if (!conn)
return ERR_PTR(-ENOTCONN);
@@ -2277,7 +2277,7 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
size_t pdu_len;
u8 sar;
- BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
+ BT_DBG("chan %pK, msg %pK, len %zu", chan, msg, len);
/* It is critical that ERTM PDUs fit in a single HCI fragment,
* so fragmented skbs are not used. The HCI layer's handling
@@ -2344,7 +2344,7 @@ static struct sk_buff *l2cap_create_le_flowctl_pdu(struct l2cap_chan *chan,
int err, count, hlen;
struct l2cap_hdr *lh;
- BT_DBG("chan %p len %zu", chan, len);
+ BT_DBG("chan %pK len %zu", chan, len);
if (!conn)
return ERR_PTR(-ENOTCONN);
@@ -2386,7 +2386,7 @@ static int l2cap_segment_le_sdu(struct l2cap_chan *chan,
size_t pdu_len;
u16 sdu_len;
- BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
+ BT_DBG("chan %pK, msg %pK, len %zu", chan, msg, len);
sdu_len = len;
pdu_len = chan->remote_mps - L2CAP_SDULEN_SIZE;
@@ -2552,7 +2552,7 @@ static void l2cap_send_srej(struct l2cap_chan *chan, u16 txseq)
struct l2cap_ctrl control;
u16 seq;
- BT_DBG("chan %p, txseq %u", chan, txseq);
+ BT_DBG("chan %pK, txseq %u", chan, txseq);
memset(&control, 0, sizeof(control));
control.sframe = 1;
@@ -2574,7 +2574,7 @@ static void l2cap_send_srej_tail(struct l2cap_chan *chan)
{
struct l2cap_ctrl control;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (chan->srej_list.tail == L2CAP_SEQ_LIST_CLEAR)
return;
@@ -2592,7 +2592,7 @@ static void l2cap_send_srej_list(struct l2cap_chan *chan, u16 txseq)
u16 initial_head;
u16 seq;
- BT_DBG("chan %p, txseq %u", chan, txseq);
+ BT_DBG("chan %pK, txseq %u", chan, txseq);
memset(&control, 0, sizeof(control));
control.sframe = 1;
@@ -2617,7 +2617,7 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
struct sk_buff *acked_skb;
u16 ackseq;
- BT_DBG("chan %p, reqseq %u", chan, reqseq);
+ BT_DBG("chan %pK, reqseq %u", chan, reqseq);
if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq)
return;
@@ -2646,7 +2646,7 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
{
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
chan->expected_tx_seq = chan->buffer_seq;
l2cap_seq_list_clear(&chan->srej_list);
@@ -2658,7 +2658,7 @@ static void l2cap_tx_state_xmit(struct l2cap_chan *chan,
struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event)
{
- BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
+ BT_DBG("chan %pK, control %pK, skbs %pK, event %d", chan, control, skbs,
event);
switch (event) {
@@ -2730,7 +2730,7 @@ static void l2cap_tx_state_wait_f(struct l2cap_chan *chan,
struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event)
{
- BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
+ BT_DBG("chan %pK, control %pK, skbs %pK, event %d", chan, control, skbs,
event);
switch (event) {
@@ -2807,7 +2807,7 @@ static void l2cap_tx_state_wait_f(struct l2cap_chan *chan,
static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
struct sk_buff_head *skbs, u8 event)
{
- BT_DBG("chan %p, control %p, skbs %p, event %d, state %d",
+ BT_DBG("chan %pK, control %pK, skbs %pK, event %d, state %d",
chan, control, skbs, event, chan->tx_state);
switch (chan->tx_state) {
@@ -2826,14 +2826,14 @@ static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
static void l2cap_pass_to_tx(struct l2cap_chan *chan,
struct l2cap_ctrl *control)
{
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
l2cap_tx(chan, control, NULL, L2CAP_EV_RECV_REQSEQ_AND_FBIT);
}
static void l2cap_pass_to_tx_fbit(struct l2cap_chan *chan,
struct l2cap_ctrl *control)
{
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
l2cap_tx(chan, control, NULL, L2CAP_EV_RECV_FBIT);
}
@@ -2843,7 +2843,7 @@ static void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb)
struct sk_buff *nskb;
struct l2cap_chan *chan;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
mutex_lock(&conn->chan_lock);
@@ -2874,7 +2874,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, u8 code,
struct l2cap_hdr *lh;
int len, count;
- BT_DBG("conn %p, code 0x%2.2x, ident 0x%2.2x, len %u",
+ BT_DBG("conn %pK, code 0x%2.2x, ident 0x%2.2x, len %u",
conn, code, ident, dlen);
if (conn->mtu < L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE)
@@ -3033,7 +3033,7 @@ static void l2cap_ack_timeout(struct work_struct *work)
ack_timer.work);
u16 frames_to_ack;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
l2cap_chan_lock(chan);
@@ -3177,7 +3177,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
void *ptr = req->data;
u16 size;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (chan->num_conf_req || chan->num_conf_rsp)
goto done;
@@ -3306,7 +3306,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data)
u16 result = L2CAP_CONF_SUCCESS;
u16 size;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
@@ -3515,7 +3515,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_conf_efs efs;
- BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
+ BT_DBG("chan %pK, rsp %pK, len %d, req %pK", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
@@ -3620,7 +3620,7 @@ static int l2cap_build_conf_rsp(struct l2cap_chan *chan, void *data,
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
rsp->scid = cpu_to_le16(chan->dcid);
rsp->result = cpu_to_le16(result);
@@ -3634,7 +3634,7 @@ void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan)
struct l2cap_le_conn_rsp rsp;
struct l2cap_conn *conn = chan->conn;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
rsp.dcid = cpu_to_le16(chan->scid);
rsp.mtu = cpu_to_le16(chan->imtu);
@@ -3663,7 +3663,7 @@ void __l2cap_connect_rsp_defer(struct l2cap_chan *chan)
else
rsp_code = L2CAP_CONN_RSP;
- BT_DBG("chan %p rsp_code %u", chan, rsp_code);
+ BT_DBG("chan %pK rsp_code %u", chan, rsp_code);
l2cap_send_cmd(conn, chan->ident, rsp_code, sizeof(rsp), &rsp);
@@ -3691,7 +3691,7 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
.txwin_size = min_t(u16, chan->ack_win, L2CAP_DEFAULT_TX_WINDOW),
};
- BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
+ BT_DBG("chan %pK, rsp %pK, len %d", chan, rsp, len);
if ((chan->mode != L2CAP_MODE_ERTM) && (chan->mode != L2CAP_MODE_STREAMING))
return;
@@ -3994,7 +3994,7 @@ static void l2cap_send_efs_conf_rsp(struct l2cap_chan *chan, void *data,
{
struct l2cap_conn *conn = chan->conn;
- BT_DBG("conn %p chan %p ident %d flags 0x%4.4x", conn, chan, ident,
+ BT_DBG("conn %pK chan %pK ident %d flags 0x%4.4x", conn, chan, ident,
flags);
clear_bit(CONF_LOC_CONF_PEND, &chan->conf_state);
@@ -4491,7 +4491,8 @@ static int l2cap_create_channel_req(struct l2cap_conn *conn,
return 0;
}
- BT_DBG("mgr %p bredr_chan %p hs_hcon %p", mgr, chan, hs_hcon);
+ BT_DBG("mgr %pK bredr_chan %pK hs_hcon %pK",
+ mgr, chan, hs_hcon);
mgr->bredr_chan = chan;
chan->hs_hcon = hs_hcon;
@@ -4520,7 +4521,7 @@ static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id)
struct l2cap_move_chan_req req;
u8 ident;
- BT_DBG("chan %p, dest_amp_id %d", chan, dest_amp_id);
+ BT_DBG("chan %pK, dest_amp_id %d", chan, dest_amp_id);
ident = l2cap_get_ident(chan->conn);
chan->ident = ident;
@@ -4538,7 +4539,7 @@ static void l2cap_send_move_chan_rsp(struct l2cap_chan *chan, u16 result)
{
struct l2cap_move_chan_rsp rsp;
- BT_DBG("chan %p, result 0x%4.4x", chan, result);
+ BT_DBG("chan %pK, result 0x%4.4x", chan, result);
rsp.icid = cpu_to_le16(chan->dcid);
rsp.result = cpu_to_le16(result);
@@ -4551,7 +4552,7 @@ static void l2cap_send_move_chan_cfm(struct l2cap_chan *chan, u16 result)
{
struct l2cap_move_chan_cfm cfm;
- BT_DBG("chan %p, result 0x%4.4x", chan, result);
+ BT_DBG("chan %pK, result 0x%4.4x", chan, result);
chan->ident = l2cap_get_ident(chan->conn);
@@ -4568,7 +4569,7 @@ static void l2cap_send_move_chan_cfm_icid(struct l2cap_conn *conn, u16 icid)
{
struct l2cap_move_chan_cfm cfm;
- BT_DBG("conn %p, icid 0x%4.4x", conn, icid);
+ BT_DBG("conn %pK, icid 0x%4.4x", conn, icid);
cfm.icid = cpu_to_le16(icid);
cfm.result = cpu_to_le16(L2CAP_MC_UNCONFIRMED);
@@ -4688,7 +4689,7 @@ static void l2cap_logical_finish_move(struct l2cap_chan *chan,
void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan,
u8 status)
{
- BT_DBG("chan %p, hchan %p, status %d", chan, hchan, status);
+ BT_DBG("chan %pK, hchan %pK, status %d", chan, hchan, status);
if (status) {
l2cap_logical_fail(chan);
@@ -4707,7 +4708,7 @@ void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan,
void l2cap_move_start(struct l2cap_chan *chan)
{
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
if (chan->local_amp_id == AMP_ID_BREDR) {
if (chan->chan_policy != BT_CHANNEL_POLICY_AMP_PREFERRED)
@@ -4727,7 +4728,7 @@ void l2cap_move_start(struct l2cap_chan *chan)
static void l2cap_do_create(struct l2cap_chan *chan, int result,
u8 local_amp_id, u8 remote_amp_id)
{
- BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state),
+ BT_DBG("chan %pK state %s %u -> %u", chan, state_to_string(chan->state),
local_amp_id, remote_amp_id);
chan->fcs = L2CAP_FCS_NONE;
@@ -4836,7 +4837,7 @@ void __l2cap_physical_cfm(struct l2cap_chan *chan, int result)
u8 local_amp_id = chan->local_amp_id;
u8 remote_amp_id = chan->remote_amp_id;
- BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d",
+ BT_DBG("chan %pK, result %d, local_amp_id %d, remote_amp_id %d",
chan, result, local_amp_id, remote_amp_id);
if (chan->state == BT_DISCONN || chan->state == BT_CLOSED) {
@@ -5759,7 +5760,7 @@ static void l2cap_send_i_or_rr_or_rnr(struct l2cap_chan *chan)
{
struct l2cap_ctrl control;
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
memset(&control, 0, sizeof(control));
control.sframe = 1;
@@ -5914,7 +5915,7 @@ static int l2cap_rx_queued_iframes(struct l2cap_chan *chan)
* until a gap is encountered.
*/
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
while (!test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
struct sk_buff *skb;
@@ -5946,7 +5947,7 @@ static void l2cap_handle_srej(struct l2cap_chan *chan,
{
struct sk_buff *skb;
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
if (control->reqseq == chan->next_tx_seq) {
BT_DBG("Invalid reqseq %d, disconnecting", control->reqseq);
@@ -6004,7 +6005,7 @@ static void l2cap_handle_rej(struct l2cap_chan *chan,
{
struct sk_buff *skb;
- BT_DBG("chan %p, control %p", chan, control);
+ BT_DBG("chan %pK, control %pK", chan, control);
if (control->reqseq == chan->next_tx_seq) {
BT_DBG("Invalid reqseq %d, disconnecting", control->reqseq);
@@ -6038,7 +6039,7 @@ static void l2cap_handle_rej(struct l2cap_chan *chan,
static u8 l2cap_classify_txseq(struct l2cap_chan *chan, u16 txseq)
{
- BT_DBG("chan %p, txseq %d", chan, txseq);
+ BT_DBG("chan %pK, txseq %d", chan, txseq);
BT_DBG("last_acked_seq %d, expected_tx_seq %d", chan->last_acked_seq,
chan->expected_tx_seq);
@@ -6129,7 +6130,7 @@ static int l2cap_rx_state_recv(struct l2cap_chan *chan,
int err = 0;
bool skb_in_use = false;
- BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
+ BT_DBG("chan %pK, control %pK, skb %pK, event %d", chan, control, skb,
event);
switch (event) {
@@ -6185,7 +6186,7 @@ static int l2cap_rx_state_recv(struct l2cap_chan *chan,
*/
skb_queue_tail(&chan->srej_q, skb);
skb_in_use = true;
- BT_DBG("Queued %p (queue len %d)", skb,
+ BT_DBG("Queued %pK (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
clear_bit(CONN_SREJ_ACT, &chan->conn_state);
@@ -6249,7 +6250,7 @@ static int l2cap_rx_state_recv(struct l2cap_chan *chan,
}
if (skb && !skb_in_use) {
- BT_DBG("Freeing %p", skb);
+ BT_DBG("Freeing %pK", skb);
kfree_skb(skb);
}
@@ -6264,7 +6265,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
u16 txseq = control->txseq;
bool skb_in_use = false;
- BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
+ BT_DBG("chan %pK, control %pK, skb %pK, event %d", chan, control, skb,
event);
switch (event) {
@@ -6275,7 +6276,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
skb_in_use = true;
- BT_DBG("Queued %p (queue len %d)", skb,
+ BT_DBG("Queued %pK (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
chan->expected_tx_seq = __next_seq(chan, txseq);
@@ -6286,7 +6287,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
l2cap_pass_to_tx(chan, control);
skb_queue_tail(&chan->srej_q, skb);
skb_in_use = true;
- BT_DBG("Queued %p (queue len %d)", skb,
+ BT_DBG("Queued %pK (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
err = l2cap_rx_queued_iframes(chan);
@@ -6301,7 +6302,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
*/
skb_queue_tail(&chan->srej_q, skb);
skb_in_use = true;
- BT_DBG("Queued %p (queue len %d)", skb,
+ BT_DBG("Queued %pK (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
l2cap_pass_to_tx(chan, control);
@@ -6315,7 +6316,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
*/
skb_queue_tail(&chan->srej_q, skb);
skb_in_use = true;
- BT_DBG("Queued %p (queue len %d)", skb,
+ BT_DBG("Queued %pK (queue len %d)", skb,
skb_queue_len(&chan->srej_q));
l2cap_pass_to_tx(chan, control);
@@ -6392,7 +6393,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
}
if (skb && !skb_in_use) {
- BT_DBG("Freeing %p", skb);
+ BT_DBG("Freeing %pK", skb);
kfree_skb(skb);
}
@@ -6401,7 +6402,7 @@ static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
static int l2cap_finish_move(struct l2cap_chan *chan)
{
- BT_DBG("chan %p", chan);
+ BT_DBG("chan %pK", chan);
chan->rx_state = L2CAP_RX_STATE_RECV;
@@ -6419,7 +6420,7 @@ static int l2cap_rx_state_wait_p(struct l2cap_chan *chan,
{
int err;
- BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
+ BT_DBG("chan %pK, control %pK, skb %pK, event %d", chan, control, skb,
event);
if (!control->poll)
@@ -6503,7 +6504,7 @@ static int l2cap_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
{
int err = 0;
- BT_DBG("chan %p, control %p, skb %p, event %d, state %d", chan,
+ BT_DBG("chan %pK, control %pK, skb %pK, event %d, state %d", chan,
control, skb, event, chan->rx_state);
if (__valid_reqseq(chan, control->reqseq)) {
@@ -6540,7 +6541,7 @@ static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
{
int err = 0;
- BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb,
+ BT_DBG("chan %pK, control %pK, skb %pK, state %d", chan, control, skb,
chan->rx_state);
if (l2cap_classify_txseq(chan, control->txseq) ==
@@ -6562,7 +6563,7 @@ static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
chan->sdu_len = 0;
if (skb) {
- BT_DBG("Freeing %p", skb);
+ BT_DBG("Freeing %pK", skb);
kfree_skb(skb);
}
}
@@ -6675,7 +6676,7 @@ static void l2cap_chan_le_send_credits(struct l2cap_chan *chan)
return_credits = le_max_credits - chan->rx_credits;
- BT_DBG("chan %p returning %u credits to sender", chan, return_credits);
+ BT_DBG("chan %pK returning %u credits to sender", chan, return_credits);
chan->rx_credits += return_credits;
@@ -6800,7 +6801,7 @@ static void l2cap_data_channel(struct l2cap_conn *conn, u16 cid,
}
}
- BT_DBG("chan %p, len %d", chan, skb->len);
+ BT_DBG("chan %pK, len %d", chan, skb->len);
/* If we receive data on a fixed channel before the info req/rsp
* procdure is done simply assume that the channel is supported
@@ -6840,7 +6841,7 @@ static void l2cap_data_channel(struct l2cap_conn *conn, u16 cid,
goto done;
default:
- BT_DBG("chan %p: bad mode 0x%2.2x", chan, chan->mode);
+ BT_DBG("chan %pK: bad mode 0x%2.2x", chan, chan->mode);
break;
}
@@ -6865,7 +6866,7 @@ static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm,
if (!chan)
goto free_skb;
- BT_DBG("chan %p, len %d", chan, skb->len);
+ BT_DBG("chan %pK, len %d", chan, skb->len);
if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
goto drop;
@@ -6978,7 +6979,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon)
conn->hcon = hci_conn_get(hcon);
conn->hchan = hchan;
- BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan);
+ BT_DBG("hcon %pK conn %pK hchan %pK", hcon, conn, hchan);
switch (hcon->type) {
case LE_LINK:
@@ -7274,7 +7275,7 @@ static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
if (hcon->type != ACL_LINK && hcon->type != LE_LINK)
return;
- BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
+ BT_DBG("hcon %pK bdaddr %pMR status %d", hcon, &hcon->dst, status);
if (status) {
l2cap_conn_del(hcon, bt_to_errno(status));
@@ -7329,7 +7330,7 @@ int l2cap_disconn_ind(struct hci_conn *hcon)
{
struct l2cap_conn *conn = hcon->l2cap_data;
- BT_DBG("hcon %p", hcon);
+ BT_DBG("hcon %pK", hcon);
if (!conn)
return HCI_ERROR_REMOTE_USER_TERM;
@@ -7341,7 +7342,7 @@ static void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
if (hcon->type != ACL_LINK && hcon->type != LE_LINK)
return;
- BT_DBG("hcon %p reason %d", hcon, reason);
+ BT_DBG("hcon %pK reason %d", hcon, reason);
l2cap_conn_del(hcon, bt_to_errno(reason));
}
@@ -7371,14 +7372,14 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
if (!conn)
return;
- BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
+ BT_DBG("conn %pK status 0x%2.2x encrypt %u", conn, status, encrypt);
mutex_lock(&conn->chan_lock);
list_for_each_entry(chan, &conn->chan_l, list) {
l2cap_chan_lock(chan);
- BT_DBG("chan %p scid 0x%4.4x state %s", chan, chan->scid,
+ BT_DBG("chan %pK scid 0x%4.4x state %s", chan, chan->scid,
state_to_string(chan->state));
if (chan->scid == L2CAP_CID_A2MP) {
@@ -7470,7 +7471,7 @@ void l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)
if (!conn)
goto drop;
- BT_DBG("conn %p len %d flags 0x%x", conn, skb->len, flags);
+ BT_DBG("conn %pK len %d flags 0x%x", conn, skb->len, flags);
switch (flags) {
case ACL_START:
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 1bb551527044..f737493a6e71 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -84,7 +84,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
struct sockaddr_l2 la;
int len, err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
@@ -178,7 +178,7 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr,
struct sockaddr_l2 la;
int len, err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (!addr || alen < sizeof(addr->sa_family) ||
addr->sa_family != AF_BLUETOOTH)
@@ -254,7 +254,7 @@ static int l2cap_sock_listen(struct socket *sock, int backlog)
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
int err = 0;
- BT_DBG("sk %p backlog %d", sk, backlog);
+ BT_DBG("sk %pK backlog %d", sk, backlog);
lock_sock(sk);
@@ -311,7 +311,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock,
timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
- BT_DBG("sk %p timeo %ld", sk, timeo);
+ BT_DBG("sk %pK timeo %ld", sk, timeo);
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk_sleep(sk), &wait);
@@ -348,7 +348,7 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock,
newsock->state = SS_CONNECTED;
- BT_DBG("new socket %p", nsk);
+ BT_DBG("new socket %pK", nsk);
done:
release_sock(sk);
@@ -362,7 +362,7 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr,
struct sock *sk = sock->sk;
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (peer && sk->sk_state != BT_CONNECTED &&
sk->sk_state != BT_CONNECT && sk->sk_state != BT_CONNECT2 &&
@@ -398,7 +398,7 @@ static int l2cap_sock_getsockopt_old(struct socket *sock, int optname,
int len, err = 0;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (get_user(len, optlen))
return -EFAULT;
@@ -500,7 +500,7 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname,
struct bt_power pwr;
int len, err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (level == SOL_L2CAP)
return l2cap_sock_getsockopt_old(sock, optname, optval, optlen);
@@ -636,7 +636,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
int len, err = 0;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
lock_sock(sk);
@@ -750,7 +750,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
int len, err = 0;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (level == SOL_L2CAP)
return l2cap_sock_setsockopt_old(sock, optname, optval, optlen);
@@ -951,7 +951,7 @@ static int l2cap_sock_sendmsg(struct socket *sock, struct msghdr *msg,
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
int err;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
err = sock_error(sk);
if (err)
@@ -1045,7 +1045,7 @@ static void l2cap_sock_kill(struct sock *sk)
if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
return;
- BT_DBG("sk %p state %s", sk, state_to_string(sk->sk_state));
+ BT_DBG("sk %pK state %s", sk, state_to_string(sk->sk_state));
/* Kill poor orphan */
@@ -1106,7 +1106,7 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)
struct l2cap_conn *conn;
int err = 0;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -1125,7 +1125,7 @@ static int l2cap_sock_shutdown(struct socket *sock, int how)
/* prevent chan structure from being freed whilst unlocked */
l2cap_chan_hold(chan);
- BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
+ BT_DBG("chan %pK state %s", chan, state_to_string(chan->state));
if (chan->mode == L2CAP_MODE_ERTM &&
chan->unacked_frames > 0 &&
@@ -1190,7 +1190,7 @@ static int l2cap_sock_release(struct socket *sock)
struct sock *sk = sock->sk;
int err;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -1208,14 +1208,14 @@ static void l2cap_sock_cleanup_listen(struct sock *parent)
{
struct sock *sk;
- BT_DBG("parent %p state %s", parent,
+ BT_DBG("parent %pK state %s", parent,
state_to_string(parent->sk_state));
/* Close not yet accepted channels */
while ((sk = bt_accept_dequeue(parent, NULL))) {
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
- BT_DBG("child chan %p state %s", chan,
+ BT_DBG("child chan %pK state %s", chan,
state_to_string(chan->state));
l2cap_chan_lock(chan);
@@ -1305,7 +1305,7 @@ static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)
struct sock *sk = chan->data;
struct sock *parent;
- BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
+ BT_DBG("chan %pK state %s", chan, state_to_string(chan->state));
/* This callback can be called both for server (BT_LISTEN)
* sockets as well as "normal" ones. To avoid lockdep warnings
@@ -1392,7 +1392,7 @@ static void l2cap_sock_ready_cb(struct l2cap_chan *chan)
parent = bt_sk(sk)->parent;
- BT_DBG("sk %p, parent %p", sk, parent);
+ BT_DBG("sk %pK, parent %pK", sk, parent);
sk->sk_state = BT_CONNECTED;
sk->sk_state_change(sk);
@@ -1471,7 +1471,7 @@ static const struct l2cap_ops l2cap_chan_ops = {
static void l2cap_sock_destruct(struct sock *sk)
{
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (l2cap_pi(sk)->chan)
l2cap_chan_put(l2cap_pi(sk)->chan);
@@ -1502,7 +1502,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
{
struct l2cap_chan *chan = l2cap_pi(sk)->chan;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (parent) {
struct l2cap_chan *pchan = l2cap_pi(parent)->chan;
@@ -1609,7 +1609,7 @@ static int l2cap_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
sock->state = SS_UNCONNECTED;
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index aa4cf64e32a6..e87b965230bf 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -145,7 +145,7 @@ void bt_info(const char *format, ...)
vaf.fmt = format;
vaf.va = &args;
- pr_info("%pV", &vaf);
+ pr_info("%pKV", &vaf);
va_end(args);
}
@@ -161,7 +161,7 @@ void bt_warn(const char *format, ...)
vaf.fmt = format;
vaf.va = &args;
- pr_warn("%pV", &vaf);
+ pr_warn("%pKV", &vaf);
va_end(args);
}
@@ -177,7 +177,7 @@ void bt_err(const char *format, ...)
vaf.fmt = format;
vaf.va = &args;
- pr_err("%pV", &vaf);
+ pr_err("%pKV", &vaf);
va_end(args);
}
@@ -193,7 +193,7 @@ void bt_err_ratelimited(const char *format, ...)
vaf.fmt = format;
vaf.va = &args;
- pr_err_ratelimited("%pV", &vaf);
+ pr_err_ratelimited("%pKV", &vaf);
va_end(args);
}
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 7f22119276f3..f00e788e0184 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -281,7 +281,7 @@ static int read_version(struct sock *sk, struct hci_dev *hdev, void *data,
{
struct mgmt_rp_read_version rp;
- BT_DBG("sock %p", sk);
+ BT_DBG("sock %pK", sk);
rp.version = MGMT_VERSION;
rp.revision = cpu_to_le16(MGMT_REVISION);
@@ -298,7 +298,7 @@ static int read_commands(struct sock *sk, struct hci_dev *hdev, void *data,
size_t rp_size;
int i, err;
- BT_DBG("sock %p", sk);
+ BT_DBG("sock %pK", sk);
if (hci_sock_test_flag(sk, HCI_SOCK_TRUSTED)) {
num_commands = ARRAY_SIZE(mgmt_commands);
@@ -351,7 +351,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
u16 count;
int err;
- BT_DBG("sock %p", sk);
+ BT_DBG("sock %pK", sk);
read_lock(&hci_dev_list_lock);
@@ -411,7 +411,7 @@ static int read_unconf_index_list(struct sock *sk, struct hci_dev *hdev,
u16 count;
int err;
- BT_DBG("sock %p", sk);
+ BT_DBG("sock %pK", sk);
read_lock(&hci_dev_list_lock);
@@ -471,7 +471,7 @@ static int read_ext_index_list(struct sock *sk, struct hci_dev *hdev,
u16 count;
int err;
- BT_DBG("sock %p", sk);
+ BT_DBG("sock %pK", sk);
read_lock(&hci_dev_list_lock);
@@ -588,7 +588,7 @@ static int read_config_info(struct sock *sk, struct hci_dev *hdev,
struct mgmt_rp_read_config_info rp;
u32 options = 0;
- BT_DBG("sock %p %s", sk, hdev->name);
+ BT_DBG("sock %pK %s", sk, hdev->name);
hci_dev_lock(hdev);
@@ -1373,7 +1373,7 @@ static int read_controller_info(struct sock *sk, struct hci_dev *hdev,
{
struct mgmt_rp_read_info rp;
- BT_DBG("sock %p %s", sk, hdev->name);
+ BT_DBG("sock %pK %s", sk, hdev->name);
hci_dev_lock(hdev);
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 29709fbfd1f5..6a83e1b14575 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -184,13 +184,13 @@ static inline int __check_fcs(u8 *data, int type, u8 fcs)
/* ---- L2CAP callbacks ---- */
static void rfcomm_l2state_change(struct sock *sk)
{
- BT_DBG("%p state %d", sk, sk->sk_state);
+ BT_DBG("%pK state %d", sk, sk->sk_state);
rfcomm_schedule();
}
static void rfcomm_l2data_ready(struct sock *sk)
{
- BT_DBG("%p", sk);
+ BT_DBG("%pK", sk);
rfcomm_schedule();
}
@@ -237,7 +237,7 @@ static void rfcomm_session_timeout(unsigned long arg)
{
struct rfcomm_session *s = (void *) arg;
- BT_DBG("session %p state %ld", s, s->state);
+ BT_DBG("session %pK state %ld", s, s->state);
set_bit(RFCOMM_TIMED_OUT, &s->flags);
rfcomm_schedule();
@@ -245,14 +245,14 @@ static void rfcomm_session_timeout(unsigned long arg)
static void rfcomm_session_set_timer(struct rfcomm_session *s, long timeout)
{
- BT_DBG("session %p state %ld timeout %ld", s, s->state, timeout);
+ BT_DBG("session %pK state %ld timeout %ld", s, s->state, timeout);
mod_timer(&s->timer, jiffies + timeout);
}
static void rfcomm_session_clear_timer(struct rfcomm_session *s)
{
- BT_DBG("session %p state %ld", s, s->state);
+ BT_DBG("session %pK state %ld", s, s->state);
del_timer_sync(&s->timer);
}
@@ -262,7 +262,7 @@ static void rfcomm_dlc_timeout(unsigned long arg)
{
struct rfcomm_dlc *d = (void *) arg;
- BT_DBG("dlc %p state %ld", d, d->state);
+ BT_DBG("dlc %pK state %ld", d, d->state);
set_bit(RFCOMM_TIMED_OUT, &d->flags);
rfcomm_dlc_put(d);
@@ -271,7 +271,7 @@ static void rfcomm_dlc_timeout(unsigned long arg)
static void rfcomm_dlc_set_timer(struct rfcomm_dlc *d, long timeout)
{
- BT_DBG("dlc %p state %ld timeout %ld", d, d->state, timeout);
+ BT_DBG("dlc %pK state %ld timeout %ld", d, d->state, timeout);
if (!mod_timer(&d->timer, jiffies + timeout))
rfcomm_dlc_hold(d);
@@ -279,7 +279,7 @@ static void rfcomm_dlc_set_timer(struct rfcomm_dlc *d, long timeout)
static void rfcomm_dlc_clear_timer(struct rfcomm_dlc *d)
{
- BT_DBG("dlc %p state %ld", d, d->state);
+ BT_DBG("dlc %pK state %ld", d, d->state);
if (del_timer(&d->timer))
rfcomm_dlc_put(d);
@@ -287,7 +287,7 @@ static void rfcomm_dlc_clear_timer(struct rfcomm_dlc *d)
static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d)
{
- BT_DBG("%p", d);
+ BT_DBG("%pK", d);
d->state = BT_OPEN;
d->flags = 0;
@@ -315,14 +315,14 @@ struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio)
rfcomm_dlc_clear_state(d);
- BT_DBG("%p", d);
+ BT_DBG("%pK", d);
return d;
}
void rfcomm_dlc_free(struct rfcomm_dlc *d)
{
- BT_DBG("%p", d);
+ BT_DBG("%pK", d);
skb_queue_purge(&d->tx_queue);
kfree(d);
@@ -330,7 +330,7 @@ void rfcomm_dlc_free(struct rfcomm_dlc *d)
static void rfcomm_dlc_link(struct rfcomm_session *s, struct rfcomm_dlc *d)
{
- BT_DBG("dlc %p session %p", d, s);
+ BT_DBG("dlc %pK session %pK", d, s);
rfcomm_session_clear_timer(s);
rfcomm_dlc_hold(d);
@@ -342,7 +342,7 @@ static void rfcomm_dlc_unlink(struct rfcomm_dlc *d)
{
struct rfcomm_session *s = d->session;
- BT_DBG("dlc %p refcnt %d session %p", d, atomic_read(&d->refcnt), s);
+ BT_DBG("dlc %pK refcnt %d session %pK", d, atomic_read(&d->refcnt), s);
list_del(&d->list);
d->session = NULL;
@@ -374,7 +374,7 @@ static int __rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst,
int err = 0;
u8 dlci;
- BT_DBG("dlc %p state %ld %pMR -> %pMR channel %d",
+ BT_DBG("dlc %pK state %ld %pMR -> %pMR channel %d",
d, d->state, src, dst, channel);
if (rfcomm_check_channel(channel))
@@ -454,8 +454,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
if (!s)
return 0;
- BT_DBG("dlc %p state %ld dlci %d err %d session %p",
- d, d->state, d->dlci, err, s);
+ BT_DBG("dlc %pK state %ld dlci %d err %d session %pK",
+ d, d->state, d->dlci, err, s);
switch (d->state) {
case BT_CONNECT:
@@ -505,7 +505,7 @@ int rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
struct rfcomm_dlc *d_list;
struct rfcomm_session *s, *s_list;
- BT_DBG("dlc %p state %ld dlci %d err %d", d, d->state, d->dlci, err);
+ BT_DBG("dlc %pK state %ld dlci %d err %d", d, d->state, d->dlci, err);
rfcomm_lock();
@@ -559,7 +559,7 @@ int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb)
if (d->state != BT_CONNECTED)
return -ENOTCONN;
- BT_DBG("dlc %p mtu %d len %d", d, d->mtu, len);
+ BT_DBG("dlc %pK mtu %d len %d", d, d->mtu, len);
if (len > d->mtu)
return -EINVAL;
@@ -576,7 +576,7 @@ void rfcomm_dlc_send_noerror(struct rfcomm_dlc *d, struct sk_buff *skb)
{
int len = skb->len;
- BT_DBG("dlc %p mtu %d len %d", d, d->mtu, len);
+ BT_DBG("dlc %pK mtu %d len %d", d, d->mtu, len);
rfcomm_make_uih(skb, d->addr);
skb_queue_tail(&d->tx_queue, skb);
@@ -588,7 +588,7 @@ void rfcomm_dlc_send_noerror(struct rfcomm_dlc *d, struct sk_buff *skb)
void __rfcomm_dlc_throttle(struct rfcomm_dlc *d)
{
- BT_DBG("dlc %p state %ld", d, d->state);
+ BT_DBG("dlc %pK state %ld", d, d->state);
if (!d->cfc) {
d->v24_sig |= RFCOMM_V24_FC;
@@ -599,7 +599,7 @@ void __rfcomm_dlc_throttle(struct rfcomm_dlc *d)
void __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
{
- BT_DBG("dlc %p state %ld", d, d->state);
+ BT_DBG("dlc %pK state %ld", d, d->state);
if (!d->cfc) {
d->v24_sig &= ~RFCOMM_V24_FC;
@@ -615,8 +615,8 @@ void __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
*/
int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig)
{
- BT_DBG("dlc %p state %ld v24_sig 0x%x",
- d, d->state, v24_sig);
+ BT_DBG("dlc %pK state %ld v24_sig 0x%x",
+ d, d->state, v24_sig);
if (test_bit(RFCOMM_RX_THROTTLED, &d->flags))
v24_sig |= RFCOMM_V24_FC;
@@ -633,8 +633,8 @@ int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig)
int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig)
{
- BT_DBG("dlc %p state %ld v24_sig 0x%x",
- d, d->state, d->v24_sig);
+ BT_DBG("dlc %pK state %ld v24_sig 0x%x",
+ d, d->state, d->v24_sig);
*v24_sig = d->v24_sig;
return 0;
@@ -648,7 +648,7 @@ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state)
if (!s)
return NULL;
- BT_DBG("session %p sock %p", s, sock);
+ BT_DBG("session %pK sock %pK", s, sock);
setup_timer(&s->timer, rfcomm_session_timeout, (unsigned long) s);
@@ -676,7 +676,7 @@ static struct rfcomm_session *rfcomm_session_del(struct rfcomm_session *s)
{
int state = s->state;
- BT_DBG("session %p state %ld", s, s->state);
+ BT_DBG("session %pK state %ld", s, s->state);
list_del(&s->list);
@@ -714,7 +714,7 @@ static struct rfcomm_session *rfcomm_session_close(struct rfcomm_session *s,
s->state = BT_CLOSED;
- BT_DBG("session %p state %ld err %d", s, s->state, err);
+ BT_DBG("session %pK state %ld err %d", s, s->state, err);
/* Close all dlcs */
list_for_each_safe(p, n, &s->dlcs) {
@@ -800,7 +800,7 @@ static int rfcomm_send_frame(struct rfcomm_session *s, u8 *data, int len)
struct kvec iv = { data, len };
struct msghdr msg;
- BT_DBG("session %p len %d", s, len);
+ BT_DBG("session %pK len %d", s, len);
memset(&msg, 0, sizeof(msg));
@@ -809,7 +809,7 @@ static int rfcomm_send_frame(struct rfcomm_session *s, u8 *data, int len)
static int rfcomm_send_cmd(struct rfcomm_session *s, struct rfcomm_cmd *cmd)
{
- BT_DBG("%p cmd %u", s, cmd->ctrl);
+ BT_DBG("%pK cmd %u", s, cmd->ctrl);
return rfcomm_send_frame(s, (void *) cmd, sizeof(*cmd));
}
@@ -818,7 +818,7 @@ static int rfcomm_send_sabm(struct rfcomm_session *s, u8 dlci)
{
struct rfcomm_cmd cmd;
- BT_DBG("%p dlci %d", s, dlci);
+ BT_DBG("%pK dlci %d", s, dlci);
cmd.addr = __addr(s->initiator, dlci);
cmd.ctrl = __ctrl(RFCOMM_SABM, 1);
@@ -832,7 +832,7 @@ static int rfcomm_send_ua(struct rfcomm_session *s, u8 dlci)
{
struct rfcomm_cmd cmd;
- BT_DBG("%p dlci %d", s, dlci);
+ BT_DBG("%pK dlci %d", s, dlci);
cmd.addr = __addr(!s->initiator, dlci);
cmd.ctrl = __ctrl(RFCOMM_UA, 1);
@@ -846,7 +846,7 @@ static int rfcomm_send_disc(struct rfcomm_session *s, u8 dlci)
{
struct rfcomm_cmd cmd;
- BT_DBG("%p dlci %d", s, dlci);
+ BT_DBG("%pK dlci %d", s, dlci);
cmd.addr = __addr(s->initiator, dlci);
cmd.ctrl = __ctrl(RFCOMM_DISC, 1);
@@ -861,7 +861,7 @@ static int rfcomm_queue_disc(struct rfcomm_dlc *d)
struct rfcomm_cmd *cmd;
struct sk_buff *skb;
- BT_DBG("dlc %p dlci %d", d, d->dlci);
+ BT_DBG("dlc %pK dlci %d", d, d->dlci);
skb = alloc_skb(sizeof(*cmd), GFP_KERNEL);
if (!skb)
@@ -882,7 +882,7 @@ static int rfcomm_send_dm(struct rfcomm_session *s, u8 dlci)
{
struct rfcomm_cmd cmd;
- BT_DBG("%p dlci %d", s, dlci);
+ BT_DBG("%pK dlci %d", s, dlci);
cmd.addr = __addr(!s->initiator, dlci);
cmd.ctrl = __ctrl(RFCOMM_DM, 1);
@@ -898,7 +898,7 @@ static int rfcomm_send_nsc(struct rfcomm_session *s, int cr, u8 type)
struct rfcomm_mcc *mcc;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d type %d", s, cr, type);
+ BT_DBG("%pK cr %d type %d", s, cr, type);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -924,7 +924,7 @@ static int rfcomm_send_pn(struct rfcomm_session *s, int cr, struct rfcomm_dlc *d
struct rfcomm_pn *pn;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d dlci %d mtu %d", s, cr, d->dlci, d->mtu);
+ BT_DBG("%pK cr %d dlci %d mtu %d", s, cr, d->dlci, d->mtu);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -969,10 +969,9 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci,
struct rfcomm_rpn *rpn;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d dlci %d bit_r 0x%x data_b 0x%x stop_b 0x%x parity 0x%x"
- " flwc_s 0x%x xon_c 0x%x xoff_c 0x%x p_mask 0x%x",
- s, cr, dlci, bit_rate, data_bits, stop_bits, parity,
- flow_ctrl_settings, xon_char, xoff_char, param_mask);
+ BT_DBG("%pK cr %d dlci %d bit_r 0x%x data_b 0x%x stop_b 0x%x parity 0x%x flwc_s 0x%x xon_c 0x%x xoff_c 0x%x p_mask 0x%x",
+ s, cr, dlci, bit_rate, data_bits, stop_bits, parity,
+ flow_ctrl_settings, xon_char, xoff_char, param_mask);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -1004,7 +1003,7 @@ static int rfcomm_send_rls(struct rfcomm_session *s, int cr, u8 dlci, u8 status)
struct rfcomm_rls *rls;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d status 0x%x", s, cr, status);
+ BT_DBG("%pK cr %d status 0x%x", s, cr, status);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -1031,7 +1030,7 @@ static int rfcomm_send_msc(struct rfcomm_session *s, int cr, u8 dlci, u8 v24_sig
struct rfcomm_msc *msc;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d v24 0x%x", s, cr, v24_sig);
+ BT_DBG("%pK cr %d v24 0x%x", s, cr, v24_sig);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -1057,7 +1056,7 @@ static int rfcomm_send_fcoff(struct rfcomm_session *s, int cr)
struct rfcomm_mcc *mcc;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d", s, cr);
+ BT_DBG("%pK cr %d", s, cr);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -1079,7 +1078,7 @@ static int rfcomm_send_fcon(struct rfcomm_session *s, int cr)
struct rfcomm_mcc *mcc;
u8 buf[16], *ptr = buf;
- BT_DBG("%p cr %d", s, cr);
+ BT_DBG("%pK cr %d", s, cr);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = __addr(s->initiator, 0);
@@ -1105,7 +1104,7 @@ static int rfcomm_send_test(struct rfcomm_session *s, int cr, u8 *pattern, int l
if (len > 125)
return -EINVAL;
- BT_DBG("%p cr %d", s, cr);
+ BT_DBG("%pK cr %d", s, cr);
hdr[0] = __addr(s->initiator, 0);
hdr[1] = __ctrl(RFCOMM_UIH, 0);
@@ -1132,7 +1131,7 @@ static int rfcomm_send_credits(struct rfcomm_session *s, u8 addr, u8 credits)
struct rfcomm_hdr *hdr;
u8 buf[16], *ptr = buf;
- BT_DBG("%p addr %d credits %d", s, addr, credits);
+ BT_DBG("%pK addr %d credits %d", s, addr, credits);
hdr = (void *) ptr; ptr += sizeof(*hdr);
hdr->addr = addr;
@@ -1169,7 +1168,7 @@ static void rfcomm_make_uih(struct sk_buff *skb, u8 addr)
/* ---- RFCOMM frame reception ---- */
static struct rfcomm_session *rfcomm_recv_ua(struct rfcomm_session *s, u8 dlci)
{
- BT_DBG("session %p state %ld dlci %d", s, s->state, dlci);
+ BT_DBG("session %pK state %ld dlci %d", s, s->state, dlci);
if (dlci) {
/* Data channel */
@@ -1223,7 +1222,7 @@ static struct rfcomm_session *rfcomm_recv_dm(struct rfcomm_session *s, u8 dlci)
{
int err = 0;
- BT_DBG("session %p state %ld dlci %d", s, s->state, dlci);
+ BT_DBG("session %pK state %ld dlci %d", s, s->state, dlci);
if (dlci) {
/* Data DLC */
@@ -1253,7 +1252,7 @@ static struct rfcomm_session *rfcomm_recv_disc(struct rfcomm_session *s,
{
int err = 0;
- BT_DBG("session %p state %ld dlci %d", s, s->state, dlci);
+ BT_DBG("session %pK state %ld dlci %d", s, s->state, dlci);
if (dlci) {
struct rfcomm_dlc *d = rfcomm_dlc_get(s, dlci);
@@ -1288,7 +1287,7 @@ void rfcomm_dlc_accept(struct rfcomm_dlc *d)
struct sock *sk = d->session->sock->sk;
struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
- BT_DBG("dlc %p", d);
+ BT_DBG("dlc %pK", d);
rfcomm_send_ua(d->session, d->dlci);
@@ -1329,7 +1328,7 @@ static int rfcomm_recv_sabm(struct rfcomm_session *s, u8 dlci)
struct rfcomm_dlc *d;
u8 channel;
- BT_DBG("session %p state %ld dlci %d", s, s->state, dlci);
+ BT_DBG("session %pK state %ld dlci %d", s, s->state, dlci);
if (!dlci) {
rfcomm_send_ua(s, 0);
@@ -1370,8 +1369,8 @@ static int rfcomm_apply_pn(struct rfcomm_dlc *d, int cr, struct rfcomm_pn *pn)
{
struct rfcomm_session *s = d->session;
- BT_DBG("dlc %p state %ld dlci %d mtu %d fc 0x%x credits %d",
- d, d->state, d->dlci, pn->mtu, pn->flow_ctrl, pn->credits);
+ BT_DBG("dlc %pK state %ld dlci %d mtu %d fc 0x%x credits %d",
+ d, d->state, d->dlci, pn->mtu, pn->flow_ctrl, pn->credits);
if ((pn->flow_ctrl == 0xf0 && s->cfc != RFCOMM_CFC_DISABLED) ||
pn->flow_ctrl == 0xe0) {
@@ -1401,7 +1400,7 @@ static int rfcomm_recv_pn(struct rfcomm_session *s, int cr, struct sk_buff *skb)
struct rfcomm_dlc *d;
u8 dlci = pn->dlci;
- BT_DBG("session %p state %ld dlci %d", s, s->state, dlci);
+ BT_DBG("session %pK state %ld dlci %d", s, s->state, dlci);
if (!dlci)
return 0;
@@ -1617,7 +1616,7 @@ static int rfcomm_recv_mcc(struct rfcomm_session *s, struct sk_buff *skb)
type = __get_mcc_type(mcc->type);
len = __get_mcc_len(mcc->len);
- BT_DBG("%p type 0x%x cr %d", s, type, cr);
+ BT_DBG("%pK type 0x%x cr %d", s, type, cr);
skb_pull(skb, 2);
@@ -1672,7 +1671,7 @@ static int rfcomm_recv_data(struct rfcomm_session *s, u8 dlci, int pf, struct sk
{
struct rfcomm_dlc *d;
- BT_DBG("session %p state %ld dlci %d pf %d", s, s->state, dlci, pf);
+ BT_DBG("session %pK state %ld dlci %d pf %d", s, s->state, dlci, pf);
d = rfcomm_dlc_get(s, dlci);
if (!d) {
@@ -1774,7 +1773,7 @@ static void rfcomm_process_connect(struct rfcomm_session *s)
struct rfcomm_dlc *d;
struct list_head *p, *n;
- BT_DBG("session %p state %ld", s, s->state);
+ BT_DBG("session %pK state %ld", s, s->state);
list_for_each_safe(p, n, &s->dlcs) {
d = list_entry(p, struct rfcomm_dlc, list);
@@ -1798,8 +1797,8 @@ static int rfcomm_process_tx(struct rfcomm_dlc *d)
struct sk_buff *skb;
int err;
- BT_DBG("dlc %p state %ld cfc %d rx_credits %d tx_credits %d",
- d, d->state, d->cfc, d->rx_credits, d->tx_credits);
+ BT_DBG("dlc %pK state %ld cfc %d rx_credits %d tx_credits %d",
+ d, d->state, d->cfc, d->rx_credits, d->tx_credits);
/* Send pending MSC */
if (test_and_clear_bit(RFCOMM_MSC_PENDING, &d->flags))
@@ -1846,7 +1845,7 @@ static void rfcomm_process_dlcs(struct rfcomm_session *s)
struct rfcomm_dlc *d;
struct list_head *p, *n;
- BT_DBG("session %p state %ld", s, s->state);
+ BT_DBG("session %pK state %ld", s, s->state);
list_for_each_safe(p, n, &s->dlcs) {
d = list_entry(p, struct rfcomm_dlc, list);
@@ -1907,7 +1906,8 @@ static struct rfcomm_session *rfcomm_process_rx(struct rfcomm_session *s)
struct sock *sk = sock->sk;
struct sk_buff *skb;
- BT_DBG("session %p state %ld qlen %d", s, s->state, skb_queue_len(&sk->sk_receive_queue));
+ BT_DBG("session %pK state %ld qlen %d", s, s->state,
+ skb_queue_len(&sk->sk_receive_queue));
/* Get data directly from socket receive queue without copying it. */
while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
@@ -1937,7 +1937,7 @@ static void rfcomm_accept_connection(struct rfcomm_session *s)
if (list_empty(&bt_sk(sock->sk)->accept_q))
return;
- BT_DBG("session %p", s);
+ BT_DBG("session %pK", s);
err = kernel_accept(sock, &nsock, O_NONBLOCK);
if (err < 0)
@@ -1963,7 +1963,7 @@ static struct rfcomm_session *rfcomm_check_connection(struct rfcomm_session *s)
{
struct sock *sk = s->sock->sk;
- BT_DBG("%p state %ld", s, s->state);
+ BT_DBG("%pK state %ld", s, s->state);
switch (sk->sk_state) {
case BT_CONNECTED:
@@ -2116,7 +2116,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
struct rfcomm_dlc *d;
struct list_head *p, *n;
- BT_DBG("conn %p status 0x%02x encrypt 0x%02x", conn, status, encrypt);
+ BT_DBG("conn %pK status 0x%02x encrypt 0x%02x", conn, status, encrypt);
s = rfcomm_session_get(&conn->hdev->bdaddr, &conn->dst);
if (!s)
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 7511df72347f..e8922de3c725 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -68,7 +68,7 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
if (!sk)
return;
- BT_DBG("dlc %p state %ld err %d", d, d->state, err);
+ BT_DBG("dlc %pK state %ld err %d", d, d->state, err);
local_irq_save(flags);
bh_lock_sock(sk);
@@ -156,7 +156,7 @@ static void rfcomm_sock_destruct(struct sock *sk)
{
struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc;
- BT_DBG("sk %p dlc %p", sk, d);
+ BT_DBG("sk %pK dlc %pK", sk, d);
skb_queue_purge(&sk->sk_receive_queue);
skb_queue_purge(&sk->sk_write_queue);
@@ -176,7 +176,7 @@ static void rfcomm_sock_cleanup_listen(struct sock *parent)
{
struct sock *sk;
- BT_DBG("parent %p", parent);
+ BT_DBG("parent %pK", parent);
/* Close not yet accepted dlcs */
while ((sk = bt_accept_dequeue(parent, NULL))) {
@@ -196,7 +196,8 @@ static void rfcomm_sock_kill(struct sock *sk)
if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
return;
- BT_DBG("sk %p state %d refcnt %d", sk, sk->sk_state, atomic_read(&sk->sk_refcnt));
+ BT_DBG("sk %pK state %d refcnt %d", sk, sk->sk_state,
+ atomic_read(&sk->sk_refcnt));
/* Kill poor orphan */
bt_sock_unlink(&rfcomm_sk_list, sk);
@@ -208,7 +209,7 @@ static void __rfcomm_sock_close(struct sock *sk)
{
struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc;
- BT_DBG("sk %p state %d socket %p", sk, sk->sk_state, sk->sk_socket);
+ BT_DBG("sk %pK state %d socket %pK", sk, sk->sk_state, sk->sk_socket);
switch (sk->sk_state) {
case BT_LISTEN:
@@ -241,7 +242,7 @@ static void rfcomm_sock_init(struct sock *sk, struct sock *parent)
{
struct rfcomm_pinfo *pi = rfcomm_pi(sk);
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (parent) {
sk->sk_type = parent->sk_type;
@@ -306,7 +307,7 @@ static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int
bt_sock_link(&rfcomm_sk_list, sk);
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
return sk;
}
@@ -315,7 +316,7 @@ static int rfcomm_sock_create(struct net *net, struct socket *sock,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
sock->state = SS_UNCONNECTED;
@@ -345,7 +346,7 @@ static int rfcomm_sock_bind(struct socket *sock, struct sockaddr *addr, int addr
len = min_t(unsigned int, sizeof(sa), addr_len);
memcpy(&sa, addr, len);
- BT_DBG("sk %p %pMR", sk, &sa.rc_bdaddr);
+ BT_DBG("sk %pK %pMR", sk, &sa.rc_bdaddr);
lock_sock(sk);
@@ -385,7 +386,7 @@ static int rfcomm_sock_connect(struct socket *sock, struct sockaddr *addr, int a
struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc;
int err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (alen < sizeof(struct sockaddr_rc) ||
addr->sa_family != AF_BLUETOOTH)
@@ -426,7 +427,7 @@ static int rfcomm_sock_listen(struct socket *sock, int backlog)
struct sock *sk = sock->sk;
int err = 0;
- BT_DBG("sk %p backlog %d", sk, backlog);
+ BT_DBG("sk %pK backlog %d", sk, backlog);
lock_sock(sk);
@@ -486,7 +487,7 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f
timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
- BT_DBG("sk %p timeo %ld", sk, timeo);
+ BT_DBG("sk %pK timeo %ld", sk, timeo);
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk_sleep(sk), &wait);
@@ -523,7 +524,7 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f
newsock->state = SS_CONNECTED;
- BT_DBG("new socket %p", nsk);
+ BT_DBG("new socket %pK", nsk);
done:
release_sock(sk);
@@ -535,7 +536,7 @@ static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *
struct sockaddr_rc *sa = (struct sockaddr_rc *) addr;
struct sock *sk = sock->sk;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (peer && sk->sk_state != BT_CONNECTED &&
sk->sk_state != BT_CONNECT && sk->sk_state != BT_CONNECT2)
@@ -570,7 +571,7 @@ static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg,
if (sk->sk_shutdown & SEND_SHUTDOWN)
return -EPIPE;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
lock_sock(sk);
@@ -650,7 +651,7 @@ static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname, char __u
int err = 0;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
lock_sock(sk);
@@ -693,7 +694,7 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, c
size_t len;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (level == SOL_RFCOMM)
return rfcomm_sock_setsockopt_old(sock, optname, optval, optlen);
@@ -762,7 +763,7 @@ static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __u
int len, err = 0;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (get_user(len, optlen))
return -EFAULT;
@@ -834,7 +835,7 @@ static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c
struct bt_security sec;
int len, err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (level == SOL_RFCOMM)
return rfcomm_sock_getsockopt_old(sock, optname, optval, optlen);
@@ -889,7 +890,7 @@ static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned lon
struct sock *sk __maybe_unused = sock->sk;
int err;
- BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
+ BT_DBG("sk %pK cmd %x arg %lx", sk, cmd, arg);
err = bt_sock_ioctl(sock, cmd, arg);
@@ -911,7 +912,7 @@ static int rfcomm_sock_shutdown(struct socket *sock, int how)
struct sock *sk = sock->sk;
int err = 0;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -934,7 +935,7 @@ static int rfcomm_sock_release(struct socket *sock)
struct sock *sk = sock->sk;
int err;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -956,7 +957,7 @@ int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc *
bdaddr_t src, dst;
int result = 0;
- BT_DBG("session %p channel %d", s, channel);
+ BT_DBG("session %pK channel %d", s, channel);
rfcomm_session_getaddr(s, &src, &dst);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 8e385a0ae60e..71f8126be12b 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -83,7 +83,7 @@ static void rfcomm_dev_destruct(struct tty_port *port)
struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port);
struct rfcomm_dlc *dlc = dev->dlc;
- BT_DBG("dev %p dlc %p", dev, dlc);
+ BT_DBG("dev %pK dlc %pK", dev, dlc);
rfcomm_dlc_lock(dlc);
/* Detach DLC if it's owned by this dev */
@@ -396,7 +396,7 @@ static int __rfcomm_create_dev(struct sock *sk, void __user *arg)
if (copy_from_user(&req, arg, sizeof(req)))
return -EFAULT;
- BT_DBG("sk %p dev_id %d flags 0x%x", sk, req.dev_id, req.flags);
+ BT_DBG("sk %pK dev_id %d flags 0x%x", sk, req.dev_id, req.flags);
if (req.flags != NOCAP_FLAGS && !capable(CAP_NET_ADMIN))
return -EPERM;
@@ -581,7 +581,7 @@ static int rfcomm_get_dev_info(void __user *arg)
int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg)
{
- BT_DBG("cmd %d arg %p", cmd, arg);
+ BT_DBG("cmd %d arg %pK", cmd, arg);
switch (cmd) {
case RFCOMMCREATEDEV:
@@ -615,7 +615,7 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb)
return;
}
- BT_DBG("dlc %p len %d", dlc, skb->len);
+ BT_DBG("dlc %pK len %d", dlc, skb->len);
tty_insert_flip_string(&dev->port, skb->data, skb->len);
tty_flip_buffer_push(&dev->port);
@@ -629,7 +629,7 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
if (!dev)
return;
- BT_DBG("dlc %p dev %p err %d", dlc, dev, err);
+ BT_DBG("dlc %pK dev %pK err %d", dlc, dev, err);
dev->err = err;
if (dlc->state == BT_CONNECTED) {
@@ -646,7 +646,7 @@ static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
if (!dev)
return;
- BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig);
+ BT_DBG("dlc %pK dev %pK v24_sig 0x%02x", dlc, dev, v24_sig);
if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV))
tty_port_tty_hangup(&dev->port, true);
@@ -664,7 +664,7 @@ static void rfcomm_tty_copy_pending(struct rfcomm_dev *dev)
struct sk_buff *skb;
int inserted = 0;
- BT_DBG("dev %p", dev);
+ BT_DBG("dev %pK", dev);
rfcomm_dlc_lock(dev->dlc);
@@ -749,9 +749,9 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
struct rfcomm_dev *dev = tty->driver_data;
int err;
- BT_DBG("tty %p id %d", tty, tty->index);
+ BT_DBG("tty %pK id %d", tty, tty->index);
- BT_DBG("dev %p dst %pMR channel %d opened %d", dev, &dev->dst,
+ BT_DBG("dev %pK dst %pMR channel %d opened %d", dev, &dev->dst,
dev->channel, dev->port.count);
err = tty_port_open(&dev->port, tty, filp);
@@ -774,8 +774,8 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc,
- dev->port.count);
+ BT_DBG("tty %pK dev %pK dlc %pK opened %d", tty, dev, dev->dlc,
+ dev->port.count);
tty_port_close(&dev->port, tty, filp);
}
@@ -787,7 +787,7 @@ static int rfcomm_tty_write(struct tty_struct *tty, const unsigned char *buf, in
struct sk_buff *skb;
int sent = 0, size;
- BT_DBG("tty %p count %d", tty, count);
+ BT_DBG("tty %pK count %d", tty, count);
while (count) {
size = min_t(uint, count, dlc->mtu);
@@ -817,14 +817,14 @@ static int rfcomm_tty_write_room(struct tty_struct *tty)
if (dev && dev->dlc)
room = rfcomm_room(dev);
- BT_DBG("tty %p room %d", tty, room);
+ BT_DBG("tty %pK room %d", tty, room);
return room;
}
static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
{
- BT_DBG("tty %p cmd 0x%02x", tty, cmd);
+ BT_DBG("tty %pK cmd 0x%02x", tty, cmd);
switch (cmd) {
case TCGETS:
@@ -878,7 +878,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p termios %p", tty, old);
+ BT_DBG("tty %pK termios %pK", tty, old);
if (!dev || !dev->dlc || !dev->dlc->session)
return;
@@ -1010,7 +1010,7 @@ static void rfcomm_tty_throttle(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
rfcomm_dlc_throttle(dev->dlc);
}
@@ -1019,7 +1019,7 @@ static void rfcomm_tty_unthrottle(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
rfcomm_dlc_unthrottle(dev->dlc);
}
@@ -1028,7 +1028,7 @@ static int rfcomm_tty_chars_in_buffer(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
if (!dev || !dev->dlc)
return 0;
@@ -1043,7 +1043,7 @@ static void rfcomm_tty_flush_buffer(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
if (!dev || !dev->dlc)
return;
@@ -1054,19 +1054,19 @@ static void rfcomm_tty_flush_buffer(struct tty_struct *tty)
static void rfcomm_tty_send_xchar(struct tty_struct *tty, char ch)
{
- BT_DBG("tty %p ch %c", tty, ch);
+ BT_DBG("tty %pK ch %c", tty, ch);
}
static void rfcomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
{
- BT_DBG("tty %p timeout %d", tty, timeout);
+ BT_DBG("tty %pK timeout %d", tty, timeout);
}
static void rfcomm_tty_hangup(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
tty_port_hangup(&dev->port);
}
@@ -1075,7 +1075,7 @@ static int rfcomm_tty_tiocmget(struct tty_struct *tty)
{
struct rfcomm_dev *dev = (struct rfcomm_dev *) tty->driver_data;
- BT_DBG("tty %p dev %p", tty, dev);
+ BT_DBG("tty %pK dev %pK", tty, dev);
return dev->modem_status;
}
@@ -1086,7 +1086,7 @@ static int rfcomm_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigne
struct rfcomm_dlc *dlc = dev->dlc;
u8 v24_sig;
- BT_DBG("tty %p dev %p set 0x%02x clear 0x%02x", tty, dev, set, clear);
+ BT_DBG("tty %pK dev %pK set 0x%02x clear 0x%02x", tty, dev, set, clear);
rfcomm_dlc_get_modem_status(dlc, &v24_sig);
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index f52bcbf2e58c..7d5457d64212 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -76,7 +76,7 @@ static void sco_sock_timeout(unsigned long arg)
{
struct sock *sk = (struct sock *)arg;
- BT_DBG("sock %p state %d", sk, sk->sk_state);
+ BT_DBG("sock %pK state %d", sk, sk->sk_state);
bh_lock_sock(sk);
sk->sk_err = ETIMEDOUT;
@@ -89,13 +89,13 @@ static void sco_sock_timeout(unsigned long arg)
static void sco_sock_set_timer(struct sock *sk, long timeout)
{
- BT_DBG("sock %p state %d timeout %ld", sk, sk->sk_state, timeout);
+ BT_DBG("sock %pK state %d timeout %ld", sk, sk->sk_state, timeout);
sk_reset_timer(sk, &sk->sk_timer, jiffies + timeout);
}
static void sco_sock_clear_timer(struct sock *sk)
{
- BT_DBG("sock %p state %d", sk, sk->sk_state);
+ BT_DBG("sock %pK state %d", sk, sk->sk_state);
sk_stop_timer(sk, &sk->sk_timer);
}
@@ -122,7 +122,7 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
else
conn->mtu = 60;
- BT_DBG("hcon %p conn %p", hcon, conn);
+ BT_DBG("hcon %pK conn %pK", hcon, conn);
return conn;
}
@@ -135,7 +135,7 @@ static void sco_chan_del(struct sock *sk, int err)
conn = sco_pi(sk)->conn;
- BT_DBG("sk %p, conn %p, err %d", sk, conn, err);
+ BT_DBG("sk %pK, conn %pK, err %d", sk, conn, err);
if (conn) {
sco_conn_lock(conn);
@@ -162,7 +162,7 @@ static void sco_conn_del(struct hci_conn *hcon, int err)
if (!conn)
return;
- BT_DBG("hcon %p conn %p, err %d", hcon, conn, err);
+ BT_DBG("hcon %pK conn %pK, err %d", hcon, conn, err);
/* Kill socket */
sco_conn_lock(conn);
@@ -186,7 +186,7 @@ static void sco_conn_del(struct hci_conn *hcon, int err)
static void __sco_chan_add(struct sco_conn *conn, struct sock *sk,
struct sock *parent)
{
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
sco_pi(sk)->conn = conn;
conn->sk = sk;
@@ -281,7 +281,7 @@ static int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
if (len > conn->mtu)
return -EINVAL;
- BT_DBG("sk %p len %d", sk, len);
+ BT_DBG("sk %pK len %d", sk, len);
skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &err);
if (!skb)
@@ -308,7 +308,7 @@ static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
if (!sk)
goto drop;
- BT_DBG("sk %p len %d", sk, skb->len);
+ BT_DBG("sk %pK len %d", sk, skb->len);
if (sk->sk_state != BT_CONNECTED)
goto drop;
@@ -365,7 +365,7 @@ static struct sock *sco_get_sock_listen(bdaddr_t *src)
static void sco_sock_destruct(struct sock *sk)
{
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
skb_queue_purge(&sk->sk_receive_queue);
skb_queue_purge(&sk->sk_write_queue);
@@ -375,7 +375,7 @@ static void sco_sock_cleanup_listen(struct sock *parent)
{
struct sock *sk;
- BT_DBG("parent %p", parent);
+ BT_DBG("parent %pK", parent);
/* Close not yet accepted channels */
while ((sk = bt_accept_dequeue(parent, NULL))) {
@@ -395,7 +395,7 @@ static void sco_sock_kill(struct sock *sk)
if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
return;
- BT_DBG("sk %p state %d", sk, sk->sk_state);
+ BT_DBG("sk %pK state %d", sk, sk->sk_state);
/* Kill poor orphan */
bt_sock_unlink(&sco_sk_list, sk);
@@ -405,7 +405,7 @@ static void sco_sock_kill(struct sock *sk)
static void __sco_sock_close(struct sock *sk)
{
- BT_DBG("sk %p state %d socket %p", sk, sk->sk_state, sk->sk_socket);
+ BT_DBG("sk %pK state %d socket %pK", sk, sk->sk_state, sk->sk_socket);
switch (sk->sk_state) {
case BT_LISTEN:
@@ -449,7 +449,7 @@ static void sco_sock_close(struct sock *sk)
static void sco_sock_init(struct sock *sk, struct sock *parent)
{
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (parent) {
sk->sk_type = parent->sk_type;
@@ -497,7 +497,7 @@ static int sco_sock_create(struct net *net, struct socket *sock, int protocol,
{
struct sock *sk;
- BT_DBG("sock %p", sock);
+ BT_DBG("sock %pK", sock);
sock->state = SS_UNCONNECTED;
@@ -521,7 +521,7 @@ static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
struct sock *sk = sock->sk;
int err = 0;
- BT_DBG("sk %p %pMR", sk, &sa->sco_bdaddr);
+ BT_DBG("sk %pK %pMR", sk, &sa->sco_bdaddr);
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
@@ -556,7 +556,7 @@ static int sco_sock_connect(struct socket *sock, struct sockaddr *addr, int alen
struct sock *sk = sock->sk;
int err;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (alen < sizeof(struct sockaddr_sco) ||
addr->sa_family != AF_BLUETOOTH)
@@ -591,7 +591,7 @@ static int sco_sock_listen(struct socket *sock, int backlog)
bdaddr_t *src = &sco_pi(sk)->src;
int err = 0;
- BT_DBG("sk %p backlog %d", sk, backlog);
+ BT_DBG("sk %pK backlog %d", sk, backlog);
lock_sock(sk);
@@ -637,7 +637,7 @@ static int sco_sock_accept(struct socket *sock, struct socket *newsock,
timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
- BT_DBG("sk %p timeo %ld", sk, timeo);
+ BT_DBG("sk %pK timeo %ld", sk, timeo);
/* Wait for an incoming connection. (wake-one). */
add_wait_queue_exclusive(sk_sleep(sk), &wait);
@@ -673,7 +673,7 @@ static int sco_sock_accept(struct socket *sock, struct socket *newsock,
newsock->state = SS_CONNECTED;
- BT_DBG("new socket %p", ch);
+ BT_DBG("new socket %pK", ch);
done:
release_sock(sk);
@@ -686,7 +686,7 @@ static int sco_sock_getname(struct socket *sock, struct sockaddr *addr,
struct sockaddr_sco *sa = (struct sockaddr_sco *) addr;
struct sock *sk = sock->sk;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
addr->sa_family = AF_BLUETOOTH;
*len = sizeof(struct sockaddr_sco);
@@ -705,7 +705,7 @@ static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
struct sock *sk = sock->sk;
int err;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
err = sock_error(sk);
if (err)
@@ -729,7 +729,7 @@ static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting)
{
struct hci_dev *hdev = conn->hdev;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
conn->state = BT_CONFIG;
@@ -799,7 +799,7 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
struct bt_voice voice;
u32 opt;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
lock_sock(sk);
@@ -864,7 +864,7 @@ static int sco_sock_getsockopt_old(struct socket *sock, int optname,
struct sco_conninfo cinfo;
int len, err = 0;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (get_user(len, optlen))
return -EFAULT;
@@ -924,7 +924,7 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname,
int len, err = 0;
struct bt_voice voice;
- BT_DBG("sk %p", sk);
+ BT_DBG("sk %pK", sk);
if (level == SOL_SCO)
return sco_sock_getsockopt_old(sock, optname, optval, optlen);
@@ -971,7 +971,7 @@ static int sco_sock_shutdown(struct socket *sock, int how)
struct sock *sk = sock->sk;
int err = 0;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -1001,7 +1001,7 @@ static int sco_sock_release(struct socket *sock)
struct sock *sk = sock->sk;
int err = 0;
- BT_DBG("sock %p, sk %p", sock, sk);
+ BT_DBG("sock %pK, sk %pK", sock, sk);
if (!sk)
return 0;
@@ -1025,7 +1025,7 @@ static void sco_conn_ready(struct sco_conn *conn)
struct sock *parent;
struct sock *sk = conn->sk;
- BT_DBG("conn %p", conn);
+ BT_DBG("conn %pK", conn);
if (sk) {
sco_sock_clear_timer(sk);
@@ -1112,7 +1112,7 @@ static void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
return;
- BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
+ BT_DBG("hcon %pK bdaddr %pMR status %d", hcon, &hcon->dst, status);
if (!status) {
struct sco_conn *conn;
@@ -1129,7 +1129,7 @@ static void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
return;
- BT_DBG("hcon %p reason %d", hcon, reason);
+ BT_DBG("hcon %pK reason %d", hcon, reason);
sco_conn_del(hcon, bt_to_errno(reason));
}
@@ -1141,7 +1141,7 @@ void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
if (!conn)
goto drop;
- BT_DBG("conn %p len %d", conn, skb->len);
+ BT_DBG("conn %pK len %d", conn, skb->len);
if (skb->len) {
sco_recv_frame(conn, skb);
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index ffed8a1d4f27..92214d97890b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -177,7 +177,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;
}
@@ -380,7 +380,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;
}
@@ -952,7 +952,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,
@@ -983,7 +983,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,
@@ -1238,7 +1238,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];
@@ -1368,7 +1368,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);
}
@@ -1730,7 +1730,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;
@@ -1915,7 +1915,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;
@@ -2067,7 +2067,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;
@@ -2113,7 +2113,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;
@@ -2248,7 +2248,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;
@@ -2305,7 +2305,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)
@@ -2412,7 +2412,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;
@@ -2436,7 +2436,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;
@@ -2545,7 +2545,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;
@@ -2624,7 +2624,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;
@@ -2737,7 +2737,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;
@@ -2919,7 +2919,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);
@@ -2936,7 +2936,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))
@@ -3002,7 +3002,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);
@@ -3025,7 +3025,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
@@ -3043,7 +3043,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) {
@@ -3095,7 +3095,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)
@@ -3116,7 +3116,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;
}
@@ -3221,7 +3221,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) {