aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-07-10 08:27:49 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-07-10 14:40:50 -0400
commitb44006728d1e553dcebe114252ed8b617db3eace (patch)
tree9eab18ddf258204f974fb8677e453781883a8b27 /net
parent2104786b429766adb32b5300bb5b4258abfd4b16 (diff)
Bluetooth: debug: Correct types specifiers for L2CAP
Avoid unneeded type conversion by correcting type specifiers in debug statements for L2CAP. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d42dfdc83ebb..e90dacda1072 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1657,7 +1657,7 @@ static void l2cap_streaming_send(struct l2cap_chan *chan,
1657 1657
1658 l2cap_do_send(chan, skb); 1658 l2cap_do_send(chan, skb);
1659 1659
1660 BT_DBG("Sent txseq %d", (int)control->txseq); 1660 BT_DBG("Sent txseq %u", control->txseq);
1661 1661
1662 chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq); 1662 chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
1663 chan->frames_sent++; 1663 chan->frames_sent++;
@@ -1722,11 +1722,11 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
1722 chan->tx_send_head = skb_queue_next(&chan->tx_q, skb); 1722 chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
1723 1723
1724 l2cap_do_send(chan, tx_skb); 1724 l2cap_do_send(chan, tx_skb);
1725 BT_DBG("Sent txseq %d", (int)control->txseq); 1725 BT_DBG("Sent txseq %u", control->txseq);
1726 } 1726 }
1727 1727
1728 BT_DBG("Sent %d, %d unacked, %d in ERTM queue", sent, 1728 BT_DBG("Sent %d, %u unacked, %u in ERTM queue", sent,
1729 (int) chan->unacked_frames, skb_queue_len(&chan->tx_q)); 1729 chan->unacked_frames, skb_queue_len(&chan->tx_q));
1730 1730
1731 return sent; 1731 return sent;
1732} 1732}
@@ -1884,7 +1884,7 @@ static void l2cap_send_ack(struct l2cap_chan *chan)
1884 threshold += threshold << 1; 1884 threshold += threshold << 1;
1885 threshold >>= 2; 1885 threshold >>= 2;
1886 1886
1887 BT_DBG("frames_to_ack %d, threshold %d", (int)frames_to_ack, 1887 BT_DBG("frames_to_ack %u, threshold %d", frames_to_ack,
1888 threshold); 1888 threshold);
1889 1889
1890 if (frames_to_ack >= threshold) { 1890 if (frames_to_ack >= threshold) {
@@ -1946,15 +1946,15 @@ static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
1946} 1946}
1947 1947
1948static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan, 1948static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
1949 struct msghdr *msg, size_t len, 1949 struct msghdr *msg, size_t len,
1950 u32 priority) 1950 u32 priority)
1951{ 1951{
1952 struct l2cap_conn *conn = chan->conn; 1952 struct l2cap_conn *conn = chan->conn;
1953 struct sk_buff *skb; 1953 struct sk_buff *skb;
1954 int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE; 1954 int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE;
1955 struct l2cap_hdr *lh; 1955 struct l2cap_hdr *lh;
1956 1956
1957 BT_DBG("chan %p len %d priority %u", chan, (int)len, priority); 1957 BT_DBG("chan %p len %zu priority %u", chan, len, priority);
1958 1958
1959 count = min_t(unsigned int, (conn->mtu - hlen), len); 1959 count = min_t(unsigned int, (conn->mtu - hlen), len);
1960 1960
@@ -1980,15 +1980,15 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
1980} 1980}
1981 1981
1982static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan, 1982static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
1983 struct msghdr *msg, size_t len, 1983 struct msghdr *msg, size_t len,
1984 u32 priority) 1984 u32 priority)
1985{ 1985{
1986 struct l2cap_conn *conn = chan->conn; 1986 struct l2cap_conn *conn = chan->conn;
1987 struct sk_buff *skb; 1987 struct sk_buff *skb;
1988 int err, count; 1988 int err, count;
1989 struct l2cap_hdr *lh; 1989 struct l2cap_hdr *lh;
1990 1990
1991 BT_DBG("chan %p len %d", chan, (int)len); 1991 BT_DBG("chan %p len %zu", chan, len);
1992 1992
1993 count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len); 1993 count = min_t(unsigned int, (conn->mtu - L2CAP_HDR_SIZE), len);
1994 1994
@@ -2013,15 +2013,15 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
2013} 2013}
2014 2014
2015static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan, 2015static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan,
2016 struct msghdr *msg, size_t len, 2016 struct msghdr *msg, size_t len,
2017 u16 sdulen) 2017 u16 sdulen)
2018{ 2018{
2019 struct l2cap_conn *conn = chan->conn; 2019 struct l2cap_conn *conn = chan->conn;
2020 struct sk_buff *skb; 2020 struct sk_buff *skb;
2021 int err, count, hlen; 2021 int err, count, hlen;
2022 struct l2cap_hdr *lh; 2022 struct l2cap_hdr *lh;
2023 2023
2024 BT_DBG("chan %p len %d", chan, (int)len); 2024 BT_DBG("chan %p len %zu", chan, len);
2025 2025
2026 if (!conn) 2026 if (!conn)
2027 return ERR_PTR(-ENOTCONN); 2027 return ERR_PTR(-ENOTCONN);
@@ -2075,7 +2075,7 @@ static int l2cap_segment_sdu(struct l2cap_chan *chan,
2075 size_t pdu_len; 2075 size_t pdu_len;
2076 u8 sar; 2076 u8 sar;
2077 2077
2078 BT_DBG("chan %p, msg %p, len %d", chan, msg, (int)len); 2078 BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
2079 2079
2080 /* It is critical that ERTM PDUs fit in a single HCI fragment, 2080 /* It is critical that ERTM PDUs fit in a single HCI fragment,
2081 * so fragmented skbs are not used. The HCI layer's handling 2081 * 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 struct l2cap_ctrl control; 2219 struct l2cap_ctrl control;
2220 u16 seq; 2220 u16 seq;
2221 2221
2222 BT_DBG("chan %p, txseq %d", chan, txseq); 2222 BT_DBG("chan %p, txseq %u", chan, txseq);
2223 2223
2224 memset(&control, 0, sizeof(control)); 2224 memset(&control, 0, sizeof(control));
2225 control.sframe = 1; 2225 control.sframe = 1;
@@ -2259,7 +2259,7 @@ static void l2cap_send_srej_list(struct l2cap_chan *chan, u16 txseq)
2259 u16 initial_head; 2259 u16 initial_head;
2260 u16 seq; 2260 u16 seq;
2261 2261
2262 BT_DBG("chan %p, txseq %d", chan, txseq); 2262 BT_DBG("chan %p, txseq %u", chan, txseq);
2263 2263
2264 memset(&control, 0, sizeof(control)); 2264 memset(&control, 0, sizeof(control));
2265 control.sframe = 1; 2265 control.sframe = 1;
@@ -2284,12 +2284,12 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
2284 struct sk_buff *acked_skb; 2284 struct sk_buff *acked_skb;
2285 u16 ackseq; 2285 u16 ackseq;
2286 2286
2287 BT_DBG("chan %p, reqseq %d", chan, reqseq); 2287 BT_DBG("chan %p, reqseq %u", chan, reqseq);
2288 2288
2289 if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq) 2289 if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq)
2290 return; 2290 return;
2291 2291
2292 BT_DBG("expected_ack_seq %d, unacked_frames %d", 2292 BT_DBG("expected_ack_seq %u, unacked_frames %u",
2293 chan->expected_ack_seq, chan->unacked_frames); 2293 chan->expected_ack_seq, chan->unacked_frames);
2294 2294
2295 for (ackseq = chan->expected_ack_seq; ackseq != reqseq; 2295 for (ackseq = chan->expected_ack_seq; ackseq != reqseq;
@@ -2308,7 +2308,7 @@ static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
2308 if (chan->unacked_frames == 0) 2308 if (chan->unacked_frames == 0)
2309 __clear_retrans_timer(chan); 2309 __clear_retrans_timer(chan);
2310 2310
2311 BT_DBG("unacked_frames %d", (int) chan->unacked_frames); 2311 BT_DBG("unacked_frames %u", chan->unacked_frames);
2312} 2312}
2313 2313
2314static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan) 2314static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
@@ -2534,16 +2534,16 @@ static void l2cap_raw_recv(struct l2cap_conn *conn, struct sk_buff *skb)
2534} 2534}
2535 2535
2536/* ---- L2CAP signalling commands ---- */ 2536/* ---- L2CAP signalling commands ---- */
2537static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, 2537static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, u8 code,
2538 u8 code, u8 ident, u16 dlen, void *data) 2538 u8 ident, u16 dlen, void *data)
2539{ 2539{
2540 struct sk_buff *skb, **frag; 2540 struct sk_buff *skb, **frag;
2541 struct l2cap_cmd_hdr *cmd; 2541 struct l2cap_cmd_hdr *cmd;
2542 struct l2cap_hdr *lh; 2542 struct l2cap_hdr *lh;
2543 int len, count; 2543 int len, count;
2544 2544
2545 BT_DBG("conn %p, code 0x%2.2x, ident 0x%2.2x, len %d", 2545 BT_DBG("conn %p, code 0x%2.2x, ident 0x%2.2x, len %u",
2546 conn, code, ident, dlen); 2546 conn, code, ident, dlen);
2547 2547
2548 len = L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE + dlen; 2548 len = L2CAP_HDR_SIZE + L2CAP_CMD_HDR_SIZE + dlen;
2549 count = min_t(unsigned int, conn->mtu, len); 2549 count = min_t(unsigned int, conn->mtu, len);
@@ -2626,7 +2626,7 @@ static inline int l2cap_get_conf_opt(void **ptr, int *type, int *olen, unsigned
2626 break; 2626 break;
2627 } 2627 }
2628 2628
2629 BT_DBG("type 0x%2.2x len %d val 0x%lx", *type, opt->len, *val); 2629 BT_DBG("type 0x%2.2x len %u val 0x%lx", *type, opt->len, *val);
2630 return len; 2630 return len;
2631} 2631}
2632 2632
@@ -2634,7 +2634,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
2634{ 2634{
2635 struct l2cap_conf_opt *opt = *ptr; 2635 struct l2cap_conf_opt *opt = *ptr;
2636 2636
2637 BT_DBG("type 0x%2.2x len %d val 0x%lx", type, len, val); 2637 BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
2638 2638
2639 opt->type = type; 2639 opt->type = type;
2640 opt->len = len; 2640 opt->len = len;