Skip to content

Commit 1e4b6e9

Browse files
Colin Ian Kingholtmann
authored andcommitted
Bluetooth: make hw_err static, reduces object code size
Don't populate the const array hw_err on the stack but instead make it static. Makes the object code smaller by 45 bytes: Before: text data bss dec hex filename 100880 21090 1088 123058 1e0b2 linux/net/bluetooth/hci_core.o After: text data bss dec hex filename 100739 21186 1088 123013 1e085 linux/net/bluetooth/hci_core.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent dc786b2 commit 1e4b6e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3404,7 +3404,7 @@ EXPORT_SYMBOL(hci_resume_dev);
34043404
/* Reset HCI device */
34053405
int hci_reset_dev(struct hci_dev *hdev)
34063406
{
3407-
const u8 hw_err[] = { HCI_EV_HARDWARE_ERROR, 0x01, 0x00 };
3407+
static const u8 hw_err[] = { HCI_EV_HARDWARE_ERROR, 0x01, 0x00 };
34083408
struct sk_buff *skb;
34093409

34103410
skb = bt_skb_alloc(3, GFP_ATOMIC);

0 commit comments

Comments
 (0)