summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-01-24 18:22:54 +0100
committerMarcel Holtmann <marcel@holtmann.org>2019-01-25 08:53:58 +0100
commit1e4b6e91b46d26fdee2385f33a18115db2f0b490 (patch)
treeaab51a18a5a1674f4381404409486ec94d4086d6 /net/bluetooth
parentBluetooth: btusb: Use the cmd_timeout method to reset the Intel BT chip (diff)
downloadlinux-1e4b6e91b46d26fdee2385f33a18115db2f0b490.tar.xz
linux-1e4b6e91b46d26fdee2385f33a18115db2f0b490.zip
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 <colin.king@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 75793265ba9e..26e3d36aee29 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3404,7 +3404,7 @@ EXPORT_SYMBOL(hci_resume_dev);
/* Reset HCI device */
int hci_reset_dev(struct hci_dev *hdev)
{
- const u8 hw_err[] = { HCI_EV_HARDWARE_ERROR, 0x01, 0x00 };
+ static const u8 hw_err[] = { HCI_EV_HARDWARE_ERROR, 0x01, 0x00 };
struct sk_buff *skb;
skb = bt_skb_alloc(3, GFP_ATOMIC);