Bluetooth: Use __constant modifier for L2CAP SMP CID
authorSyam Sidhardhan <s.syam@samsung.com>
Wed, 10 Oct 2012 16:39:28 +0000 (22:09 +0530)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 11 Oct 2012 06:25:58 +0000 (14:25 +0800)
Since the L2CAP_CID_SMP is constant, __constant_cpu_to_le16() is
the right go here.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/smp.c

index 8c225ef349cd733614dfeaca0f2f1bceccdae064..9b54fea080c9648ae4b022d51e60cff85af36016 100644 (file)
@@ -165,7 +165,7 @@ static struct sk_buff *smp_build_cmd(struct l2cap_conn *conn, u8 code,
 
        lh = (struct l2cap_hdr *) skb_put(skb, L2CAP_HDR_SIZE);
        lh->len = cpu_to_le16(sizeof(code) + dlen);
-       lh->cid = cpu_to_le16(L2CAP_CID_SMP);
+       lh->cid = __constant_cpu_to_le16(L2CAP_CID_SMP);
 
        memcpy(skb_put(skb, sizeof(code)), &code, sizeof(code));