Skip to content

Commit cca3283

Browse files
Colin Ian Kingholtmann
authored andcommitted
Bluetooth: bpa10x: make array 'req' static, shrinks object size
Don't populate the const read-only array 'req' on the stack but instead make it static. Makes the object code smaller by over 40 bytes: Before: text data bss dec hex filename 8497 3408 128 12033 2f01 linux/drivers/bluetooth/bpa10x.o After: text data bss dec hex filename 8366 3496 128 11990 2ed6 linux/drivers/bluetooth/bpa10x.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 a3a446c commit cca3283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/bpa10x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int bpa10x_flush(struct hci_dev *hdev)
259259

260260
static int bpa10x_setup(struct hci_dev *hdev)
261261
{
262-
const u8 req[] = { 0x07 };
262+
static const u8 req[] = { 0x07 };
263263
struct sk_buff *skb;
264264

265265
BT_DBG("%s", hdev->name);

0 commit comments

Comments
 (0)