projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2ba7fa
)
Bluetooth: Remove unneeded calculation and magic number
author
Andrei Emeltchenko
<andrei.emeltchenko@intel.com>
Thu, 3 May 2012 07:55:52 +0000
(10:55 +0300)
committer
Gustavo Padovan
<gustavo@padovan.org>
Wed, 9 May 2012 04:40:53 +0000
(
01:40
-0300)
Remove magic number unneeded calculation since
hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/l2cap_core.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/l2cap_core.c
b/net/bluetooth/l2cap_core.c
index
7acd884
..
fcd09fb
100644
(file)
--- a/
net/bluetooth/l2cap_core.c
+++ b/
net/bluetooth/l2cap_core.c
@@
-1875,8
+1875,8
@@
static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
/* Create L2CAP header */
lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE);
lh->cid = cpu_to_le16(chan->dcid);
- lh->len = cpu_to_le16(len +
(hlen - L2CAP_HDR_SIZE)
);
- put_unaligned(chan->psm, skb_put(skb,
2
));
+ lh->len = cpu_to_le16(len +
L2CAP_PSMLEN_SIZE
);
+ put_unaligned(chan->psm, skb_put(skb,
L2CAP_PSMLEN_SIZE
));
err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
if (unlikely(err < 0)) {