From patchwork Thu Nov 24 04:46:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9444805 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 EDEE26071C for ; Thu, 24 Nov 2016 04:46:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E615726B39 for ; Thu, 24 Nov 2016 04:46:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6FCC2711E; Thu, 24 Nov 2016 04:46:26 +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 623D726B39 for ; Thu, 24 Nov 2016 04:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756704AbcKXEqV (ORCPT ); Wed, 23 Nov 2016 23:46:21 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35941 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754290AbcKXEqU (ORCPT ); Wed, 23 Nov 2016 23:46:20 -0500 Received: by mail-pf0-f193.google.com with SMTP id c4so1376383pfb.3; Wed, 23 Nov 2016 20:46:20 -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=4ewCCw/taDE3AiwYiHU4vdeIuu4VDOMzdHBoP+d8umg=; b=0Hh8nBn7WSqJzZRXZ5myEpKY+claEK+osLw38pGvXYD/GjvUFnO9HKHX8FG6dK4Zn3 NXcAyD5Sf/RoGizpmvRcGRhNlly5J8Azt+8Hm+/1uprD/8URQKNoiZVruRnqjIZ7qIgk F/3QCQ5BI19N84GVuZed3A5fjQAtuHyweutY0ck1YhkM38XgCwfTPx3leI+PWqQttkMG l5PvYgPuNZyRQkLAgqLLUta9d2mfCgosYWroFFGYbvIqiyjlMhjdK3HEM3QtZJ4282RF d9G26HRsxBQYCWNlCZvzMXDMVVSN8aAo+pKSmJMtNOZeABAsKu8xGObPNKm0lP6rB0hO f+Hg== 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=4ewCCw/taDE3AiwYiHU4vdeIuu4VDOMzdHBoP+d8umg=; b=b8s6McLR31A0ndkWUrJ3SHqg/6kJajWJGG27/4UnWuTfxrA92bJnNYmG1xD93Cgmq6 3IWtnuJmNy5JkAIPaw5DeKKDlFX0x3xiyjmOF0LRMxwwMdNbpK7J7gBc2f394uwwJ/Ui NnFyeGlv7NPPecjlSxotWclTD/IXVQ08QjbNxgu5wVZwjx9NOa3aBmx9lyqd8wYeDrXj O3LO6u7IYlYT06tPogwC+YMV6WQskW1GtBIHiOAMosK2tK4Ww6u/VoxNEaaPpzla53Wg SVTcKL5/4+lVAXJ2jsGm16Msp7K+hqf6Q7w4bL4ib62mR8E9a7/mcRuHqvGp+e7pNCp4 gkoA== X-Gm-Message-State: AKaTC03Tqb1ZLS0By3MsyJMJmRXoZZr1msYjTXamjrESulLPYHSNudGPSklfBL079q07QQ== X-Received: by 10.84.210.73 with SMTP id z67mr1187898plh.112.1479962779646; Wed, 23 Nov 2016 20:46:19 -0800 (PST) Received: from google.com ([2620:0:1000:1301:e80d:edf6:fd55:23d6]) by smtp.gmail.com with ESMTPSA id p64sm56179215pfi.88.2016.11.23.20.46.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Nov 2016 20:46:18 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Wed, 23 Nov 2016 20:46:14 -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 3/4] mac80211: Removed unused 'struct ieee80211_supported_band*' 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 b1bce14a7954 (mac80211: update opmode when adding new station) refactored ieee80211_vht_handle_opmode into __ieee80211_vht_handle_opmode and ieee80211_vht_handle_opmode leaving a set but unused variable (sband) in the former. Compiling with W=1 gives the following warning, fix it. net/mac80211/vht.c: In function ‘__ieee80211_vht_handle_opmode’: net/mac80211/vht.c:424:35: warning: variable ‘sband’ set but not used [-Wunused-but-set-variable] Remove 'struct ieee80211_local* local' as well, it was only used to set sband. This is a harmless warning, and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: b1bce14a7954 ("mac80211: update opmode when adding new station") Cc: Marek Kwaczynski Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani --- net/mac80211/vht.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c index ee71576..14920e3 100644 --- a/net/mac80211/vht.c +++ b/net/mac80211/vht.c @@ -420,14 +420,10 @@ u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, struct sta_info *sta, u8 opmode, enum nl80211_band band) { - struct ieee80211_local *local = sdata->local; - struct ieee80211_supported_band *sband; enum ieee80211_sta_rx_bandwidth new_bw; u32 changed = 0; u8 nss; - sband = local->hw.wiphy->bands[band]; - /* ignore - no support for BF yet */ if (opmode & IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF) return 0;