diff mbox series

[v2,30/50] wilc1000: use more descriptive variable names

Message ID 20211223011358.4031459-31-davidm@egauge.net
State New
Headers show
Series wilc1000: rework tx path to use sk_buffs throughout | expand

Commit Message

David Mosberger-Tang Dec. 23, 2021, 1:14 a.m. UTC
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@egauge.net>
---
 .../net/wireless/microchip/wilc1000/wlan.c    | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 deletions(-)
diff mbox series

Patch

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