Bluetooth: Remove redundant reverse_base_uuid variable
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 5 Dec 2014 11:40:01 +0000 (13:40 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 5 Dec 2014 11:47:24 +0000 (12:47 +0100)
The mgmt.c file already has a bluetooth_base_uuid variable which has the
exact same value as the reverse_base_uuid one. This patch removes the
redundant variable.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c

index 61a04a3de7addfa99a70b36a6ff0d1205d8fff65..326609fa3bda47d09cfbfcb69e271f8252cd372c 100644 (file)
@@ -6915,14 +6915,6 @@ void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192,
        mgmt_pending_remove(cmd);
 }
 
-/* this is reversed hex representation of bluetooth base uuid. We need it for
- * service uuid parsing in eir.
- */
-static const u8 reverse_base_uuid[] = {
-                       0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80,
-                       0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
 static inline bool has_uuid(u8 *uuid, u16 uuid_count, u8 (*uuids)[16])
 {
        int i;
@@ -6954,7 +6946,7 @@ static bool eir_has_uuids(u8 *eir, u16 eir_len, u16 uuid_count, u8 (*uuids)[16])
                case EIR_UUID16_ALL:
                case EIR_UUID16_SOME:
                        for (i = 0; i + 3 <= field_len; i += 2) {
-                               memcpy(uuid, reverse_base_uuid, 16);
+                               memcpy(uuid, bluetooth_base_uuid, 16);
                                uuid[13] = eir[i + 3];
                                uuid[12] = eir[i + 2];
                                if (has_uuid(uuid, uuid_count, uuids))
@@ -6964,7 +6956,7 @@ static bool eir_has_uuids(u8 *eir, u16 eir_len, u16 uuid_count, u8 (*uuids)[16])
                case EIR_UUID32_ALL:
                case EIR_UUID32_SOME:
                        for (i = 0; i + 5 <= field_len; i += 4) {
-                               memcpy(uuid, reverse_base_uuid, 16);
+                               memcpy(uuid, bluetooth_base_uuid, 16);
                                uuid[15] = eir[i + 5];
                                uuid[14] = eir[i + 4];
                                uuid[13] = eir[i + 3];