From patchwork Thu Nov 24 04:45:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9444801 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6DE936071C for ; Thu, 24 Nov 2016 04:45:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6807326B39 for ; Thu, 24 Nov 2016 04:45:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C91A2711E; Thu, 24 Nov 2016 04:45:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2A2B26B39 for ; Thu, 24 Nov 2016 04:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641AbcKXEpo (ORCPT ); Wed, 23 Nov 2016 23:45:44 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35243 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754622AbcKXEpm (ORCPT ); Wed, 23 Nov 2016 23:45:42 -0500 Received: by mail-pf0-f196.google.com with SMTP id i88so1375717pfk.2; Wed, 23 Nov 2016 20:45:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=h7xFpSnpckWeVh5Zrkk0p5tgHY6t0ytIu8gWEdNYBCw=; b=UKMvKYXqQRnxIcjBIoA8B/y7JCb5rTMx2vkjkgYqrghfj7M5IeUuF1oF8U2/YtNVqT iJqWnmUkmhZb+FJ1tPpnlCdCdJN19h/wA88yzx8FKEC1T4B6rpjtEJldkQBhIQoeBb4s 4scdSBBZZAl8nB+ucpFoeu67ahqsd+QXPY+WcxA93BXrD1pT08+9bScNRFwgWMCrAAS3 YnQj8WUy2m6Ia227NHFGl3Yx/JtjU9yml/hofh3uCzIrG9MNmQrY3XyXpIveUjrc1/Rp Y2YCl6MsNI9042+VcABbz1pehHUsqRcpWhcbtfa21iSTtzG08l4VV2mRJd8TyKjU0oGP KCSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=h7xFpSnpckWeVh5Zrkk0p5tgHY6t0ytIu8gWEdNYBCw=; b=jxJ31bEJ3P3QDK97iRkWNiDeuKawsiswq1I2u2fQdHAH2OJORefXsMcUzKcMg4GN/D cM3k9ShcclkK/pocJYrePrKpHHGeqNPNlCjWNnGQgRR4/hNA6GJFdQhjGXvH/Xg1bdLI f08zqOYBwFoIrmzcyVctfVwxfCzHYqSNvp95E1566/W6d5KX8Gw7Nv3305EK6NIsLMN+ qnVonO2TfKOzNhvD5KGkc8g2dbsTCCmvcJREsUDOnY7hnWiBpewVULCRGiIM4Aa/5Phl r/ym9BJn8K2KxfsL+QtBhPx/5CUTFowoK65aY0oYksz4zxCUbxueeAXxclCkAfUUpkai v5Sw== X-Gm-Message-State: AKaTC01RbxWEfllIZQ8CsIR77twaQYns8DKwkGtk72cNvITDRCCqbYzmHpyD4WbMA0ap/A== X-Received: by 10.99.176.78 with SMTP id z14mr897560pgo.3.1479962741703; Wed, 23 Nov 2016 20:45:41 -0800 (PST) Received: from google.com ([2620:0:1000:1301:e80d:edf6:fd55:23d6]) by smtp.gmail.com with ESMTPSA id s4sm50168769pfb.55.2016.11.23.20.45.40 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Nov 2016 20:45:40 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Wed, 23 Nov 2016 20:45:36 -0800 To: Johannes Berg Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Marek Kwaczynski , David Spinadel , Alexander Bondar , Michal Kazior Subject: [PATCH 1/4] mac80211: Removed unused 'i' variable Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations) introduced ieee80211_vif_use_reserved_switch() with a counter variable 'i' that is set but not used. Compiling with W=1 gives the following warning, fix it. net/mac80211/chan.c: In function ‘ieee80211_vif_use_reserved_switch’: net/mac80211/chan.c:1273:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] This is a harmless warning, and is only being fixed to reduce the noise obtained with W=1 in the kernel. Fixes: 5bcae31d9 ("mac80211: implement multi-vif in-place reservations") Cc: Michal Kazior Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani --- net/mac80211/chan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index e75cbf6..7550fd2 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -1270,7 +1270,7 @@ static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) struct ieee80211_sub_if_data *sdata, *sdata_tmp; struct ieee80211_chanctx *ctx, *ctx_tmp, *old_ctx; struct ieee80211_chanctx *new_ctx = NULL; - int i, err, n_assigned, n_reserved, n_ready; + int err, n_assigned, n_reserved, n_ready; int n_ctx = 0, n_vifs_switch = 0, n_vifs_assign = 0, n_vifs_ctxless = 0; lockdep_assert_held(&local->mtx); @@ -1391,8 +1391,6 @@ static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) * Update all structures, values and pointers to point to new channel * context(s). */ - - i = 0; list_for_each_entry(ctx, &local->chanctx_list, list) { if (ctx->replace_state != IEEE80211_CHANCTX_REPLACES_OTHER) continue;