]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath11k: Make read-only const array svc_id static const
authorColin Ian King <colin.i.king@gmail.com>
Thu, 19 Jun 2025 08:20:10 +0000 (09:20 +0100)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 26 Jun 2025 23:10:45 +0000 (16:10 -0700)
Don't populate the read-only array svc_id on the stack at run time,
instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250619082010.1834109-1-colin.i.king@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath11k/htc.c

index 23054ab29a5eed574be7d4b8a3e56b81d1573ba2..4571d01cc33d30c1f593a972895423c1df39b58c 100644 (file)
@@ -497,7 +497,7 @@ static u8 ath11k_htc_get_credit_allocation(struct ath11k_htc *htc,
 static int ath11k_htc_setup_target_buffer_assignments(struct ath11k_htc *htc)
 {
        struct ath11k_htc_svc_tx_credits *serv_entry;
-       u32 svc_id[] = {
+       static const u32 svc_id[] = {
                ATH11K_HTC_SVC_ID_WMI_CONTROL,
                ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1,
                ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC2,