Skip to content

Commit 79dbeaf

Browse files
yekai123123holtmann
authored andcommitted
Bluetooth: sco: Use the correct print format
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 496bdee commit 79dbeaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/bluetooth/sco.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
310310
if (!sk)
311311
goto drop;
312312

313-
BT_DBG("sk %p len %d", sk, skb->len);
313+
BT_DBG("sk %p len %u", sk, skb->len);
314314

315315
if (sk->sk_state != BT_CONNECTED)
316316
goto drop;
@@ -905,7 +905,7 @@ static int sco_sock_getsockopt_old(struct socket *sock, int optname,
905905

906906
opts.mtu = sco_pi(sk)->conn->mtu;
907907

908-
BT_DBG("mtu %d", opts.mtu);
908+
BT_DBG("mtu %u", opts.mtu);
909909

910910
len = min_t(unsigned int, len, sizeof(opts));
911911
if (copy_to_user(optval, (char *)&opts, len))
@@ -1167,7 +1167,7 @@ static void sco_connect_cfm(struct hci_conn *hcon, __u8 status)
11671167
if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
11681168
return;
11691169

1170-
BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
1170+
BT_DBG("hcon %p bdaddr %pMR status %u", hcon, &hcon->dst, status);
11711171

11721172
if (!status) {
11731173
struct sco_conn *conn;
@@ -1196,7 +1196,7 @@ void sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb)
11961196
if (!conn)
11971197
goto drop;
11981198

1199-
BT_DBG("conn %p len %d", conn, skb->len);
1199+
BT_DBG("conn %p len %u", conn, skb->len);
12001200

12011201
if (skb->len) {
12021202
sco_recv_frame(conn, skb);

0 commit comments

Comments
 (0)