[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240912144456.591494-1-colin.i.king@gmail.com>
Date: Thu, 12 Sep 2024 15:44:56 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Kalle Valo <kvalo@...nel.org>,
Jeff Johnson <jjohnson@...nel.org>,
linux-wireless@...r.kernel.org,
ath12k@...ts.infradead.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] wifi: mac80211: make read-only array svc_id static const
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@...il.com>
---
drivers/net/wireless/ath/ath12k/wmi.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 2cd3ff9b0164..190439ad7f23 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -7284,9 +7284,11 @@ static int ath12k_connect_pdev_htc_service(struct ath12k_base *ab,
u32 pdev_idx)
{
int status;
- u32 svc_id[] = { ATH12K_HTC_SVC_ID_WMI_CONTROL,
- ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1,
- ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC2 };
+ static const u32 svc_id[] = {
+ ATH12K_HTC_SVC_ID_WMI_CONTROL,
+ ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1,
+ ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC2
+ };
struct ath12k_htc_svc_conn_req conn_req = {};
struct ath12k_htc_svc_conn_resp conn_resp = {};
--
2.39.2
Powered by blists - more mailing lists