提交 b4400672 编写于 作者: A Andrei Emeltchenko 提交者: Gustavo Padovan

Bluetooth: debug: Correct types specifiers for L2CAP

Avoid unneeded type conversion by correcting type specifiers in debug
statements for L2CAP.
Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 2104786b
...@@ -1657,7 +1657,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan, ...@@ -1657,7 +1657,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan,
l2cap_do_send(chan, skb); l2cap_do_send(chan, skb);
BT_DBG("Sent txseq %d", (int)control->txseq); BT_DBG("Sent txseq %u", control->txseq);
chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq); chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
chan->frames_sent++; chan->frames_sent++;
...@@ -1722,11 +1722,11 @@ static int l2cap_ertm_send(struct l2cap_chan *chan) ...@@ -1722,11 +1722,11 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
chan->tx_send_head = skb_queue_next(&chan->tx_q, skb); chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
l2cap_do_send(chan, tx_skb); l2cap_do_send(chan, tx_skb);
BT_DBG("Sent txseq %d", (int)control->txseq); BT_DBG("Sent txseq %u", control->txseq);
} }
BT_DBG("Sent %d, %d unacked, %d in ERTM queue", sent, BT_DBG("Sent %d, %u unacked, %u in ERTM queue", sent,
(int) chan->unacked_frames, skb_queue_len(&chan->tx_q)); chan->unacked_frames, skb_queue_len(&chan->tx_q));
return sent; return sent;
} }
...@@ -1884,7 +1884,7 @@ static void l2cap_send_ack(struct l2cap_chan *chan) ...@@ -1884,7 +1884,7 @@ static void l2cap_send_ack(struct l2cap_chan *chan)
threshold += threshold << 1; threshold += threshold << 1;
threshold >>= 2; threshold >>= 2;
BT_DBG("frames_to_ack %d, threshold %d", (int)frames_to_ack, BT_DBG("frames_to_ack %u, threshold %d", frames_to_ack,
threshold); threshold);
if (frames_to_ack >= threshold) { if (frames_to_ack >= threshold) {
...@@ -1954,7 +1954,7 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan, ...@@ -1954,7 +1954,7 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE; int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE;
struct l2cap_hdr *lh; struct l2cap_hdr *lh;
BT_DBG("chan %p len %d priority %u", chan, (int)len, priority); BT_DBG("chan %p len %zu priority %u", chan, len, priority);
count = min_t(unsigned int, (conn->mtu - hlen), len); count = min_t(unsigned int, (conn->mtu - hlen), len);
...@@ -1988,7 +1988,7 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan, ...@@ -1988,7 +1988,7 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
int err, count; int err, count;
struct l2cap_hdr *lh; struct l2cap_hdr *lh;
BT_DBG("chan %p len %d", chan, (int)len); BT_DBG("chan %p len %zu", chan, len);
count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len); count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len);
...@@ -2021,7 +2021,7 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan, ...@@ -2021,7 +2021,7 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan,
int err, count, hlen; int err, count, hlen;
struct l2cap_hdr *lh; struct l2cap_hdr *lh;
BT_DBG("chan %p len %d", chan, (int)len); BT_DBG("chan %p len %zu", chan, len);
if (!conn) if (!conn)
return ERR_PTR(-ENOTCONN); return ERR_PTR(-ENOTCONN);
...@@ -2075,7 +2075,7 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan, ...@@ -2075,7 +2075,7 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
size_t pdu_len; size_t pdu_len;
u8 sar; u8 sar;
BT_DBG("chan %p, msg %p, len %d", chan, msg, (int)len); BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
/* It is critical that ERTM PDUs fit in a single HCI fragment, /* It is critical that ERTM PDUs fit in a single HCI fragment,
* so fragmented skbs are not used. The HCI layer's handling * so fragmented skbs are not used. The HCI layer's handling
...@@ -2219,7 +2219,7 @@ static void l2cap_send_srej(struct l2cap_chan *chan, u16 txseq) ...@@ -2219,7 +2219,7 @@ static void l2cap_send_srej(struct l2cap_chan *chan, u16 txseq)
struct l2cap_ctrl control; struct l2cap_ctrl control;
u16 seq; u16 seq;
BT_DBG("chan %p, txseq %d", chan, txseq); BT_DBG("chan %p, txseq %u", chan, txseq);
memset(&control, 0, sizeof(control)); memset(&control, 0, sizeof(control));
control.sframe = 1; control.sframe = 1;
...@@ -2259,7 +2259,7 @@ static void l2cap_send_srej_list(struct l2cap_chan *chan, u16 txseq) ...@@ -2259,7 +2259,7 @@ static void l2cap_send_srej_list(struct l2cap_chan *chan, u16 txseq)
u16 initial_head; u16 initial_head;
u16 seq; u16 seq;
BT_DBG("chan %p, txseq %d", chan, txseq); BT_DBG("chan %p, txseq %u", chan, txseq);
memset(&control, 0, sizeof(control)); memset(&control, 0, sizeof(control));
control.sframe = 1; control.sframe = 1;
...@@ -2284,12 +2284,12 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq) ...@@ -2284,12 +2284,12 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
struct sk_buff *acked_skb; struct sk_buff *acked_skb;
u16 ackseq; u16 ackseq;
BT_DBG("chan %p, reqseq %d", chan, reqseq); BT_DBG("chan %p, reqseq %u", chan, reqseq);
if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq) if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq)
return; return;
BT_DBG("expected_ack_seq %d, unacked_frames %d", BT_DBG("expected_ack_seq %u, unacked_frames %u",
chan->expected_ack_seq, chan->unacked_frames); chan->expected_ack_seq, chan->unacked_frames);
for (ackseq = chan->expected_ack_seq; ackseq != reqseq; for (ackseq = chan->expected_ack_seq; ackseq != reqseq;
...@@ -2308,7 +2308,7 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq) ...@@ -2308,7 +2308,7 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
if (chan->unacked_frames == 0) if (chan->unacked_frames == 0)
__clear_retrans_timer(chan); __clear_retrans_timer(chan);
BT_DBG("unacked_frames %d", (int) chan->unacked_frames); BT_DBG("unacked_frames %u", chan->unacked_frames);
} }
static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan) static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
...@@ -2534,15 +2534,15 @@ static void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb) ...@@ -2534,15 +2534,15 @@ static void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb)
} }
/* ---- L2CAP signalling commands ---- */ /* ---- L2CAP signalling commands ---- */
static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, u8 code,
u8 code, u8 ident, u16 dlen, void *data) u8 ident, u16 dlen, void *data)
{ {
struct sk_buff *skb, **frag; struct sk_buff *skb, **frag;
struct l2cap_cmd_hdr *cmd; struct l2cap_cmd_hdr *cmd;
struct l2cap_hdr *lh; struct l2cap_hdr *lh;
int len, count; int len, count;
BT_DBG("conn %p, code 0x%2.2x, ident 0x%2.2x, len %d", BT_DBG("conn %p, code 0x%2.2x, ident 0x%2.2x, len %u",
conn, code, ident, dlen); conn, code, ident, dlen);
len = L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE + dlen; len = L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE + dlen;
...@@ -2626,7 +2626,7 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned ...@@ -2626,7 +2626,7 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned
break; break;
} }
BT_DBG("type 0x%2.2x len %d val 0x%lx", *type, opt->len, *val); BT_DBG("type 0x%2.2x len %u val 0x%lx", *type, opt->len, *val);
return len; return len;
} }
...@@ -2634,7 +2634,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) ...@@ -2634,7 +2634,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
{ {
struct l2cap_conf_opt *opt = *ptr; struct l2cap_conf_opt *opt = *ptr;
BT_DBG("type 0x%2.2x len %d val 0x%lx", type, len, val); BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
opt->type = type; opt->type = type;
opt->len = len; opt->len = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册