mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] wifi: mac80211: make read-only array svc_id static const
@ 2024-09-12 14:44 Colin Ian King
  2024-09-16 20:13 ` Jeff Johnson
  2024-09-19 16:17 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2024-09-12 14:44 UTC (permalink / raw)
  To: Kalle Valo, Jeff Johnson, linux-wireless, ath12k
  Cc: kernel-janitors, linux-kernel

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>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] wifi: mac80211: make read-only array svc_id static const
  2024-09-12 14:44 [PATCH][next] wifi: mac80211: make read-only array svc_id static const Colin Ian King
@ 2024-09-16 20:13 ` Jeff Johnson
  2024-09-19 16:17 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2024-09-16 20:13 UTC (permalink / raw)
  To: Colin Ian King, Kalle Valo, Jeff Johnson, linux-wireless, ath12k
  Cc: kernel-janitors, linux-kernel

On 9/12/2024 7:44 AM, Colin Ian King wrote:

subject prefix should be wifi: ath12k:

but no need to re-send; Kalle can fix this in the pending branch

> 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>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] wifi: mac80211: make read-only array svc_id static const
  2024-09-12 14:44 [PATCH][next] wifi: mac80211: make read-only array svc_id static const Colin Ian King
  2024-09-16 20:13 ` Jeff Johnson
@ 2024-09-19 16:17 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2024-09-19 16:17 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Jeff Johnson, linux-wireless, ath12k, kernel-janitors, linux-kernel

Colin Ian King <colin.i.king@gmail.com> wrote:

> 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>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

f8acfee2f8e0 wifi: ath12k: make read-only array svc_id static const

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240912144456.591494-1-colin.i.king@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
https://docs.kernel.org/process/submitting-patches.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-19 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-12 14:44 [PATCH][next] wifi: mac80211: make read-only array svc_id static const Colin Ian King
2024-09-16 20:13 ` Jeff Johnson
2024-09-19 16:17 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®