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: <20211223011358.4031459-31-davidm@egauge.net>
Date:   Thu, 23 Dec 2021 01:14:06 +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@...nel.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 v2 30/50] wilc1000: use more descriptive variable names

Rename "i" to "vmm_table_len" to improve readability and update
kernel-doc for send_vmm_table() as well.

Signed-off-by: David Mosberger-Tang <davidm@...uge.net>
---
 .../net/wireless/microchip/wilc1000/wlan.c    | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 1cd9a7761343a..a4523b0860878 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -712,9 +712,9 @@ static int fill_vmm_table(const struct wilc *wilc,
 }
 
 /**
- * send_vmm_table() - Send the VMM table to the chip
+ * send_vmm_table() - send the VMM table to the chip
  * @wilc: Pointer to the wilc structure.
- * @i: The number of entries in the VMM table.
+ * @vmm_table_len: The number of entries in the VMM table.
  * @vmm_table: The VMM table to send.
  *
  * Send the VMM table to the chip and get back the number of entries
@@ -723,10 +723,10 @@ static int fill_vmm_table(const struct wilc *wilc,
  * Context: The bus must have been acquired before calling this
  * function.
  *
- * Return:
- *	The number of VMM table entries the chip can accept.
+ * Return: The number of VMM table entries the chip can accept.
  */
-static int send_vmm_table(struct wilc *wilc, int i, const u32 *vmm_table)
+static int send_vmm_table(struct wilc *wilc,
+			  int vmm_table_len, const u32 *vmm_table)
 {
 	const struct wilc_hif_func *func;
 	int ret, counter, entries, timeout;
@@ -758,7 +758,8 @@ static int send_vmm_table(struct wilc *wilc, int i, const u32 *vmm_table)
 	timeout = 200;
 	do {
 		ret = func->hif_block_tx(wilc, WILC_VMM_TBL_RX_SHADOW_BASE,
-					 (u8 *)vmm_table, (i + 1) * 4);
+					 (u8 *)vmm_table,
+					 (vmm_table_len + 1) * 4);
 		if (ret)
 			break;
 
@@ -899,7 +900,7 @@ static int send_packets(struct wilc *wilc, int len)
 
 int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
 {
-	int i, entries, len;
+	int vmm_table_len, entries, len;
 	u8 ac_desired_ratio[NQUEUES] = {0, 0, 0, 0};
 	u8 vmm_entries_ac[WILC_VMM_TBL_SIZE];
 	int ret = 0;
@@ -919,13 +920,13 @@ int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
 		wilc_wlan_txq_filter_dup_tcp_ack(vif->ndev);
 	srcu_read_unlock(&wilc->srcu, srcu_idx);
 
-	i = fill_vmm_table(wilc, ac_desired_ratio, vmm_table, vmm_entries_ac);
-	if (i == 0)
+	vmm_table_len = fill_vmm_table(wilc, ac_desired_ratio, vmm_table, vmm_entries_ac);
+	if (vmm_table_len == 0)
 		goto out_unlock;
 
 	acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
 
-	ret = send_vmm_table(wilc, i, vmm_table);
+	ret = send_vmm_table(wilc, vmm_table_len, vmm_table);
 	if (ret <= 0) {
 		if (ret == 0)
 			/* No VMM space available in firmware.  Inform
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ