Skip to content

Commit 948c7ca

Browse files
Colin Ian Kingholtmann
authored andcommitted
Bluetooth: btintel: make array 'param' static, shrinks object size
Don't populate the const read-only array 'param' on the stack but instead make it static. Makes the object code smaller by nearly 20 bytes: Before: text data bss dec hex filename 11605 2629 64 14298 37da linux/drivers/bluetooth/btintel.o After: text data bss dec hex filename 11531 2685 64 14280 37c8 linux/drivers/bluetooth/btintel.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent cca3283 commit 948c7ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/btintel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ EXPORT_SYMBOL_GPL(btintel_check_bdaddr);
7575

7676
int btintel_enter_mfg(struct hci_dev *hdev)
7777
{
78-
const u8 param[] = { 0x01, 0x00 };
78+
static const u8 param[] = { 0x01, 0x00 };
7979
struct sk_buff *skb;
8080

8181
skb = __hci_cmd_sync(hdev, 0xfc11, 2, param, HCI_CMD_TIMEOUT);

0 commit comments

Comments
 (0)