linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7915: make read-only array ppet16_ppet8_ru3_ru0 static const
@ 2022-04-14  9:50 Colin Ian King
  2022-04-14 12:01 ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-04-14  9:50 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
	Sean Wang, Kalle Valo, David S . Miller, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek
  Cc: kernel-janitors, linux-kernel

Don't populate the read-only array ppet16_ppet8_ru3_ru0 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/mediatek/mt76/mt7915/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index 6d29366c5139..4b3cdb48b4bc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -814,7 +814,7 @@ static void
 mt7915_gen_ppe_thresh(u8 *he_ppet, int nss)
 {
 	u8 i, ppet_bits, ppet_size, ru_bit_mask = 0x7; /* HE80 */
-	u8 ppet16_ppet8_ru3_ru0[] = {0x1c, 0xc7, 0x71};
+	static const u8 ppet16_ppet8_ru3_ru0[] = {0x1c, 0xc7, 0x71};
 
 	he_ppet[0] = FIELD_PREP(IEEE80211_PPE_THRES_NSS_MASK, nss - 1) |
 		     FIELD_PREP(IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK,
-- 
2.35.1


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

* Re: [PATCH] mt76: mt7915: make read-only array ppet16_ppet8_ru3_ru0 static const
  2022-04-14  9:50 [PATCH] mt76: mt7915: make read-only array ppet16_ppet8_ru3_ru0 static const Colin Ian King
@ 2022-04-14 12:01 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-14 12:01 UTC (permalink / raw)
  To: Colin Ian King, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
	Shayne Chen, Sean Wang, Kalle Valo, David S . Miller,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, linux-wireless,
	netdev, linux-arm-kernel, linux-mediatek
  Cc: kernel-janitors, linux-kernel

Il 14/04/22 11:50, Colin Ian King ha scritto:
> Don't populate the read-only array ppet16_ppet8_ru3_ru0 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: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

end of thread, other threads:[~2022-04-14 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14  9:50 [PATCH] mt76: mt7915: make read-only array ppet16_ppet8_ru3_ru0 static const Colin Ian King
2022-04-14 12:01 ` AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).