lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211218235404.3963475-22-davidm@egauge.net>
Date:   Sat, 18 Dec 2021 23:54:17 +0000 (UTC)
From:   David Mosberger-Tang <davidm@...uge.net>
To:     Ajay Singh <ajay.kathat@...rochip.com>
Cc:     Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        David Mosberger-Tang <davidm@...uge.net>
Subject: [PATCH 21/23] wilc1000: declare read-only ac_preserve_ratio as static
 and const

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

Signed-off-by: David Mosberger-Tang <davidm@...uge.net>
---
 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 88a981b00bda2..debed2f159215 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -633,8 +633,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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ