From patchwork Thu Feb 11 04:46:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8276631 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A68C6BEEE5 for ; Thu, 11 Feb 2016 04:46:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9AC5202B8 for ; Thu, 11 Feb 2016 04:46:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC46D2026C for ; Thu, 11 Feb 2016 04:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751935AbcBKEqq (ORCPT ); Wed, 10 Feb 2016 23:46:46 -0500 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34909 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbcBKEqp (ORCPT ); Wed, 10 Feb 2016 23:46:45 -0500 Received: by mail-pa0-f66.google.com with SMTP id fl4so1875930pad.2 for ; Wed, 10 Feb 2016 20:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ipgh3je0oGPlZ/Hz2k/H+hggd0lxjID73NgSFV6L+ew=; b=zYZxMZ1bYEFsQFbUEJ/pjg3ZfmTZXbloDJiYfHin0aDRwpz+DvJsVbeX2stieqSn8K ES9Fdq2S+wZfH+gY9PTXBy/+Xdq7s/u5dItUGZ9UUbr7yOLyVRc2rERNFqh+qwscb9ya hwzGgDnGYZD2W01/t5vEA35onlC+FGUH4REx0tjBEhNbHqK/UIU8/TuuMDXEeSvUZGVe 6xl8oVMC2gWhej1wo+SqjOKu44aExLEnxjlRYRFMBTjst2n6HlzAQvm7cSoiBN4llC1h aohF0zJm8tD22K1YV/ew5Mj3M8sLf488ulC+hWOwmVd5k8O4Knk3sajURb/8xXeacwFG VqDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ipgh3je0oGPlZ/Hz2k/H+hggd0lxjID73NgSFV6L+ew=; b=aN5MpItPUiyZpQaSnT7vXEjUsFK4TDkgQsCZW4pZhd+a1/IkRsspMmq0sLqY/WRAD0 bOn7bKiaUeAE5RBo7Z6rOnzr0J+iPJ7arMLgaxMCUlOkUd27rtR4A+g64rsP7nkm6eEt rlsKwkSCA1rYwfs55E7xskKKPDdzIkWm81w+ldH2cfhVUJUOFWfA7iOeRtQsyr53iJxJ QEo8V70qX1vjAr+4QyCI1V2ybxHST/Lgo7FtVOK17KpnePc5gwiqYpN7KE4Nrph5o1vt 048dJal5bApl11OZ9SbK03kPhDZSz6fdqyhWgtDGmisOzBOxIVSuKHweUpQPaOjFZxtR XTlQ== X-Gm-Message-State: AG10YOQfpsVy2iAe6ryFGb7hCaNi94HQTaz1Xs+NeBXRDyeDwi6717v5B2JBoxVc8v+5cA== X-Received: by 10.66.234.226 with SMTP id uh2mr63545887pac.20.1455166004988; Wed, 10 Feb 2016 20:46:44 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id v75sm8606214pfa.39.2016.02.10.20.46.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Feb 2016 20:46:44 -0800 (PST) From: Chaehyun Lim To: gregkh@linuxfoundation.org Cc: johnny.kim@atmel.com, austin.shin@atmel.com, chris.park@atmel.com, tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Chaehyun Lim Subject: [PATCH V2 4/4] staging: wilc1000: rename counter in wilc_send_config_pkt Date: Thu, 11 Feb 2016 13:46:25 +0900 Message-Id: <1455165985-5509-4-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1455165985-5509-1-git-send-email-chaehyun.lim@gmail.com> References: <1455165985-5509-1-git-send-email-chaehyun.lim@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch renames the name of counter variable to i. This change makes more readability because wilc_send_config_pkt has a similar argument name as count. Signed-off-by: Chaehyun Lim --- v2: rebase latest staging-testing drivers/staging/wilc1000/wilc_wlan.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index c6bfec3..8712eda 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1352,32 +1352,31 @@ int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size) int wilc_send_config_pkt(struct wilc_vif *vif, 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++) { - if (!wilc_wlan_cfg_get(vif, !counter, - wids[counter].id, - (counter == count - 1), + for (i = 0; i < count; i++) { + if (!wilc_wlan_cfg_get(vif, !i, + wids[i].id, + (i == count - 1), drv)) { ret = -ETIMEDOUT; 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++) { - if (!wilc_wlan_cfg_set(vif, !counter, - wids[counter].id, - wids[counter].val, - wids[counter].size, - (counter == count - 1), + for (i = 0; i < count; i++) { + if (!wilc_wlan_cfg_set(vif, !i, + wids[i].id, + wids[i].val, + wids[i].size, + (i == count - 1), drv)) { ret = -ETIMEDOUT; break;