diff mbox series

ath9k: make array voice_priority static const

Message ID 20220222121749.87513-1-colin.i.king@gmail.com
State New
Headers show
Series ath9k: make array voice_priority static const | expand

Commit Message

Colin Ian King Feb. 22, 2022, 12:17 p.m. UTC
Don't populate the read-only array voice_priority 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>
---
 drivers/net/wireless/ath/ath9k/mci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Toke Høiland-Jørgensen Feb. 26, 2022, 9:01 p.m. UTC | #1
Colin Ian King <colin.i.king@gmail.com> writes:

> Don't populate the read-only array voice_priority 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>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Kalle Valo March 9, 2022, 3:09 p.m. UTC | #2
Colin Ian King <colin.i.king@gmail.com> wrote:

> Don't populate the read-only array voice_priority 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>
> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

44d445c02388 ath9k: make array voice_priority static const
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 39d46c203f6b..5e0ae7e6412f 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -43,7 +43,7 @@  static bool ath_mci_add_profile(struct ath_common *common,
 				struct ath_mci_profile_info *info)
 {
 	struct ath_mci_profile_info *entry;
-	u8 voice_priority[] = { 110, 110, 110, 112, 110, 110, 114, 116, 118 };
+	static const u8 voice_priority[] = { 110, 110, 110, 112, 110, 110, 114, 116, 118 };
 
 	if ((mci->num_sco == ATH_MCI_MAX_SCO_PROFILE) &&
 	    (info->type == MCI_GPM_COEX_PROFILE_VOICE))