From: Andrei Emeltchenko Date: Tue, 20 Mar 2012 08:32:25 +0000 (+0200) Subject: Bluetooth: Silence sparse warning X-Git-Tag: next-20120402~35^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b5b7b65241143826efa62f4e72d35feeb8eb4890;p=karo-tx-linux.git Bluetooth: Silence sparse warning Silence sparse warning shown below: ... net/bluetooth/mgmt.c:448:15: warning: cast to restricted __le32 ... Signed-off-by: Andrei Emeltchenko Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index b8f901642b54..d93f2bfa623b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -443,9 +443,7 @@ static u16 get_uuid16(u8 *uuid128) return 0; } - memcpy(&val, &uuid128[12], 4); - - val = le32_to_cpu(val); + val = get_unaligned_le32(&uuid128[12]); if (val > 0xffff) return 0;