From patchwork Tue May 10 13:52:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9057731 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@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 87B61BF29F for ; Tue, 10 May 2016 13:54:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC53120142 for ; Tue, 10 May 2016 13:54:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 549FA2010E for ; Tue, 10 May 2016 13:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751669AbcEJNyt (ORCPT ); Tue, 10 May 2016 09:54:49 -0400 Received: from sauhun.de ([89.238.76.85]:57065 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbcEJNyr (ORCPT ); Tue, 10 May 2016 09:54:47 -0400 Received: from dslb-178-000-050-164.178.000.pools.vodafone-ip.de ([178.0.50.164]:45186 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b087Z-0004WH-A5; Tue, 10 May 2016 15:54:45 +0200 From: Wolfram Sang To: driverdev-devel@linuxdriverproject.org Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH 10/27] staging: ks7010: really iterate over multicast addresses Date: Tue, 10 May 2016 15:52:23 +0200 Message-Id: <1462888360-21649-11-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1462888360-21649-1-git-send-email-wsa@the-dreams.de> References: <1462888360-21649-1-git-send-email-wsa@the-dreams.de> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 From: Wolfram Sang The loop variable was defined but not really used. Fix this. Signed-off-by: Wolfram Sang --- drivers/staging/ks7010/ks_hostif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 367d487cef1ba8..b0a0a53d3a00bf 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -2105,7 +2105,7 @@ void hostif_sme_multicast_set(ks_wlan_private *priv) struct netdev_hw_addr *ha; char set_address[NIC_MAX_MCAST_LIST*ETH_ALEN]; unsigned long filter_type; - int i; + int i = 0; DPRINTK(3,"\n"); @@ -2128,6 +2128,7 @@ void hostif_sme_multicast_set(ks_wlan_private *priv) mc_count = netdev_mc_count(dev); netdev_for_each_mc_addr(ha, dev) { memcpy(&set_address[i*ETH_ALEN], ha->addr, ETH_ALEN); + i++; } priv->sme_i.sme_flag &= ~SME_MULTICAST; hostif_mib_set_request(priv, LOCAL_MULTICAST_ADDRESS,