]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Silence sparse warning
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Tue, 20 Mar 2012 08:32:25 +0000 (10:32 +0200)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 28 Mar 2012 15:28:48 +0000 (12:28 -0300)
Silence sparse warning shown below:
...
net/bluetooth/mgmt.c:448:15: warning: cast to restricted __le32
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/mgmt.c

index b8f901642b540e0b34736f90e2359bedd0f5308e..d93f2bfa623bafe85d3e9c752f8a19f1306839cb 100644 (file)
@@ -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;