diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-02-14 22:51:30 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2022-03-04 16:10:50 +0100 |
commit | e616fec63f517449e153051b785b1769775562ce (patch) | |
tree | c09f99cf3b78fa3db095a05b0d935a34536a91af /net/bluetooth | |
parent | Bluetooth: 6lowpan: No need to clear memory twice (diff) | |
download | linux-e616fec63f517449e153051b785b1769775562ce.tar.xz linux-e616fec63f517449e153051b785b1769775562ce.zip |
Bluetooth: make array bt_uuid_any static const
Don't populate the read-only array bt_uuid_any on the stack but
instead make it static const. Also makes the object code a little
smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 40f1f5dae9f9..89b1c0488527 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2298,7 +2298,9 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, struct mgmt_cp_remove_uuid *cp = data; struct mgmt_pending_cmd *cmd; struct bt_uuid *match, *tmp; - u8 bt_uuid_any[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + static const u8 bt_uuid_any[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; int err, found; bt_dev_dbg(hdev, "sock %p", sk); |