Thread (55 messages) 55 messages, 3 authors, 2021-12-28
STALE1614d

[PATCH v2 21/50] wilc1000: declare read-only ac_preserve_ratio as static and const

From: David Mosberger-Tang <hidden>
Date: 2021-12-23 01:17:16
Also in: lkml, netdev
Subsystem: microchip wilc1000 wifi driver, the rest · Maintainers: Ajay Singh, Claudiu Beznea, Linus Torvalds

Apart from being slightly more efficient, this makes the code easier
to follow.

Signed-off-by: David Mosberger-Tang <redacted>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index dc6608390591c..bdc31a4fd0f6a 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -636,8 +636,8 @@ static int fill_vmm_table(const struct wilc *wilc,
 	int i;
 	u8 k, ac;
 	u32 sum;
-	u8 ac_preserve_ratio[NQUEUES] = {1, 1, 1, 1};
-	u8 *num_pkts_to_add;
+	static const u8 ac_preserve_ratio[NQUEUES] = {1, 1, 1, 1};
+	const u8 *num_pkts_to_add;
 	bool ac_exist = 0;
 	int vmm_sz = 0;
 	struct sk_buff *tqe_q[NQUEUES];
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help