From: Colin Ian King Date: Mon, 14 Feb 2022 21:51:30 +0000 (+0000) Subject: Bluetooth: make array bt_uuid_any static const X-Git-Tag: v6.1-rc5~1746^2~184^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e616fec63f517449e153051b785b1769775562ce;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 40f1f5d..89b1c04 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);