counter is used as for-loop control variable and indicating index of
struct wid array. It is to improve readability by changing counter
variable name as i because wilc_send_config_pkt has a similar argument
name as count.

Signed-off-by: Chaehyun Lim <chaehyun....@gmail.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 38 ++++++++++++++---------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c 
b/drivers/staging/wilc1000/coreconfigurator.c
index dda81ee..00081bc 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -452,36 +452,36 @@ s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo 
*pstrConnectRespInfo)
 int wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids,
                         u32 count, u32 drv)
 {
-       int counter;
+       int i;
        int ret = 0;
 
        if (mode == GET_CFG) {
-               for (counter = 0; counter < count; counter++) {
-                       PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet 
[%d][%d]\n", !counter,
-                                  (counter == count - 1));
-                       if (!wilc_wlan_cfg_get(wilc, !counter,
-                                              wids[counter].id,
-                                              (counter == count - 1),
+               for (i = 0; i < count; i++) {
+                       PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet 
[%d][%d]\n", !i,
+                                  (i == count - 1));
+                       if (!wilc_wlan_cfg_get(wilc, !i,
+                                              wids[i].id,
+                                              (i == count - 1),
                                               drv)) {
                                ret = -ETIMEDOUT;
                                printk("[Sendconfigpkt]Get Timed out\n");
                                break;
                        }
                }
-               for (counter = 0; counter < count; counter++) {
-                       wids[counter].size = wilc_wlan_cfg_get_val(
-                                       wids[counter].id,
-                                       wids[counter].val,
-                                       wids[counter].size);
+               for (i = 0; i < count; i++) {
+                       wids[i].size = wilc_wlan_cfg_get_val(
+                                       wids[i].id,
+                                       wids[i].val,
+                                       wids[i].size);
                }
        } else if (mode == SET_CFG) {
-               for (counter = 0; counter < count; counter++) {
-                       PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET 
WID:%x\n", wids[counter].id);
-                       if (!wilc_wlan_cfg_set(wilc, !counter,
-                                              wids[counter].id,
-                                              wids[counter].val,
-                                              wids[counter].size,
-                                              (counter == count - 1),
+               for (i = 0; i < count; i++) {
+                       PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET 
WID:%x\n", wids[i].id);
+                       if (!wilc_wlan_cfg_set(wilc, !i,
+                                              wids[i].id,
+                                              wids[i].val,
+                                              wids[i].size,
+                                              (i == count - 1),
                                               drv)) {
                                ret = -ETIMEDOUT;
                                printk("[Sendconfigpkt]Set Timed out\n");
-- 
2.7.0

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to