From patchwork Fri Feb 5 01:35:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaehyun Lim X-Patchwork-Id: 8229991 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 801E39F6DA for ; Fri, 5 Feb 2016 01:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9DA8202F2 for ; Fri, 5 Feb 2016 01:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5316202BE for ; Fri, 5 Feb 2016 01:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbcBEBgB (ORCPT ); Thu, 4 Feb 2016 20:36:01 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34711 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbcBEBf7 (ORCPT ); Thu, 4 Feb 2016 20:35:59 -0500 Received: by mail-pf0-f180.google.com with SMTP id o185so59360077pfb.1 for ; Thu, 04 Feb 2016 17:35:58 -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=NDxyqkTE8egh1xbBU3GTO9yAGw5nQL7gI0w4BMc80ek=; b=jMVSUE9qCX3DDdxi4JCdB84vEGY9YkKsiiaoNSlIJNR45ZTsmYaGZGKz2C86NIcPUc NuRLhD9Ltdpm5EBTqMat/JIQUGolP/ljSJ7dHIf1r0HcGOGq7X0z89Oi2nJenpufC56l XILZW43eewYlk3uoIGAGM1ArhWiXzpB/QDjg7SBvoJNNjLsXQUX92eaISroj9Mdk6m7L zqoA/VsnBnP/V0jm2SsRwZKFtqwekTVL0lXN6cus7yiqu06qxAFpbys8pmc1vQu6nQIW baXtx+OuoCDZ5zNQgyShlYinaWWfFwYSGrtUse8EBbNpj4Jmuh2Ux++2cEL1e5cDA8uz pncg== 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=NDxyqkTE8egh1xbBU3GTO9yAGw5nQL7gI0w4BMc80ek=; b=I56VpFnvrCsv5rVLrlTsVgkJDEdlwykbuNemOxoBSdw0BzdxkWBv/Q8YWTX3sm+YUp voS1uVVpL/IZpe4AAeiHEkxzX/Y8oEY5XXy0sTEznPHpa8VVkV+a2UCuuBnTcYluK4yz 14E8Q3UZJ+ctZUIM4JE50P/SvMAZuSVDgd7kUv1TrK961wJrFqfxD4BhjJQ/QiDoaKAr lQkV8ZjWTc9ckqHv3AG84DZXV6nR/Y6iYdOr9HLIA0+zwhgy+hR1CPO/dr/G7Pa1hsf1 IQiVgehYABQwQlxlFQUTkbsIGHooAlU0+5GwmfpdHX+RgQkgXA3Ah5c2GR+KKeh23EWq GknQ== X-Gm-Message-State: AG10YORAaBnktwlkgkzfnJtZnAyc2zjLC6pbipdDBB8d0uFZ4puVzcl0DmWrS4i0I5Q+Wg== X-Received: by 10.98.89.4 with SMTP id n4mr15627773pfb.81.1454636158624; Thu, 04 Feb 2016 17:35:58 -0800 (PST) Received: from localhost.localdomain ([218.233.16.2]) by smtp.gmail.com with ESMTPSA id 74sm19960478pfs.33.2016.02.04.17.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 17:35:57 -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 8/8] staging: wilc1000: rename counter in wilc_send_config_pkt Date: Fri, 5 Feb 2016 10:35:18 +0900 Message-Id: <1454636118-9943-8-git-send-email-chaehyun.lim@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454636118-9943-1-git-send-email-chaehyun.lim@gmail.com> References: <1454636118-9943-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.2 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 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 --- 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");