diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-07-19 10:03:46 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-06 14:02:55 -0400 |
commit | d9fc1d54f6f8123909cdee4fa98ab1ebf6c8651c (patch) | |
tree | 6a98d181d7543ade586130f6f74ed06cefbe39d7 /net/bluetooth/a2mp.c | |
parent | ab846ec4eaea1156148841b194df808ad745bbe2 (diff) |
Bluetooth: Do not shadow hdr variable
Fix compile warnings below:
...
net/bluetooth/a2mp.c:505:33: warning: symbol 'hdr' shadows an earlier one
net/bluetooth/a2mp.c:498:25: originally declared here
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r-- | net/bluetooth/a2mp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index 57094c136230..79af661a58dd 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c | |||
@@ -325,15 +325,17 @@ static inline int a2mp_cmd_rsp(struct amp_mgr *mgr, struct sk_buff *skb, | |||
325 | /* Handle A2MP signalling */ | 325 | /* Handle A2MP signalling */ |
326 | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) | 326 | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) |
327 | { | 327 | { |
328 | struct a2mp_cmd *hdr = (void *) skb->data; | 328 | struct a2mp_cmd *hdr; |
329 | struct amp_mgr *mgr = chan->data; | 329 | struct amp_mgr *mgr = chan->data; |
330 | int err = 0; | 330 | int err = 0; |
331 | 331 | ||
332 | amp_mgr_get(mgr); | 332 | amp_mgr_get(mgr); |
333 | 333 | ||
334 | while (skb->len >= sizeof(*hdr)) { | 334 | while (skb->len >= sizeof(*hdr)) { |
335 | struct a2mp_cmd *hdr = (void *) skb->data; | 335 | u16 len; |
336 | u16 len = le16_to_cpu(hdr->len); | 336 | |
337 | hdr = (void *) skb->data; | ||
338 | len = le16_to_cpu(hdr->len); | ||
337 | 339 | ||
338 | BT_DBG("code 0x%2.2x id %d len %u", hdr->code, hdr->ident, len); | 340 | BT_DBG("code 0x%2.2x id %d len %u", hdr->code, hdr->ident, len); |
339 | 341 | ||
@@ -393,7 +395,9 @@ static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) | |||
393 | 395 | ||
394 | if (err) { | 396 | if (err) { |
395 | struct a2mp_cmd_rej rej; | 397 | struct a2mp_cmd_rej rej; |
398 | |||
396 | rej.reason = __constant_cpu_to_le16(0); | 399 | rej.reason = __constant_cpu_to_le16(0); |
400 | hdr = (void *) skb->data; | ||
397 | 401 | ||
398 | BT_DBG("Send A2MP Rej: cmd 0x%2.2x err %d", hdr->code, err); | 402 | BT_DBG("Send A2MP Rej: cmd 0x%2.2x err %d", hdr->code, err); |
399 | 403 | ||