From patchwork Thu Nov 24 04:45:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9444803 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 A420C6071C for ; Thu, 24 Nov 2016 04:46:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E97F26B39 for ; Thu, 24 Nov 2016 04:46:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 933F22711E; Thu, 24 Nov 2016 04:46:01 +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 27B8826B39 for ; Thu, 24 Nov 2016 04:46:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756676AbcKXEp4 (ORCPT ); Wed, 23 Nov 2016 23:45:56 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35283 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522AbcKXEpz (ORCPT ); Wed, 23 Nov 2016 23:45:55 -0500 Received: by mail-pf0-f194.google.com with SMTP id i88so1376040pfk.2; Wed, 23 Nov 2016 20:45:54 -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=RpsC9EGrkWxReHjXmUCCbBpFPG8PoRcGNd6u0xPHt1s=; b=V5d58zLRRAl11ltkfKxu84CVbeFhpZp8+Po7JUTFEFrV2bmFzpMwTee9WC4pzdveTy lqy0lgL1qbmRPHwqsVKME8qejOMZ++WkBJVGzijrkoG6OrrjntFa1Po3Tj48JuGafuQm Lp+k0tbjadsYbcMFaThwV23tigsJxpSZRgUXxgGuJXc4j7up4ugMAlcoO2wZk98uznCm FwP7/mjog2v/tymxKZmQliLZiIKg1VPHS80uqiHUTR+vvmKuulhxQBff/BSBgdlLtGia LkqoLbuEb+sjsh3dnaIlhG40bLD6CEP/ujOu9HhB0f+Jqx6a+SgGY1z/65J9g/njoust gVgQ== 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=RpsC9EGrkWxReHjXmUCCbBpFPG8PoRcGNd6u0xPHt1s=; b=kQSQWiWpPvoJB0/inkLhK7/czl9oZ+1pI1D6c8iHgYWPbnYc8qzgVpICX3kGp7nXLx 6hbl6FwzEqz4HbRTtCGifXD47bpPmIAbibszH7cd+6E5g6TVyptkZ0+pt8AsCKuNbyW6 s8ckbkLTG2G5xTLFOQF5paqAJOxTBY0rdZNekHueUi1GP0nxE9HOhCqkJhWP3eZa2SwX Jzr0ui4AsvWmtPVgaChp9PwctQ3XeaMoY6A8l6lKEzyZXUiJoT/Wet1wTpg253mFqvWX caenIvuJamSLCnJ4bT31D1GvxMVhM20GHaJ34SoiyrWA6jtk39wrUZJoPWr7mADcbzse 7IOg== X-Gm-Message-State: AKaTC02h1UOHhw7xP+0yqp8pHK8FS5s5EQiPUADsAwfgF5YxAiJdOhuoD5Gt04HAUanj3g== X-Received: by 10.99.127.16 with SMTP id a16mr870409pgd.27.1479962754223; Wed, 23 Nov 2016 20:45:54 -0800 (PST) Received: from google.com ([2620:0:1000:1301:e80d:edf6:fd55:23d6]) by smtp.gmail.com with ESMTPSA id x2sm40138995pfx.65.2016.11.23.20.45.53 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Nov 2016 20:45:53 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Wed, 23 Nov 2016 20:45:49 -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 2/4] mac80211: Remove unused 'len' 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 633e27132625 (mac80211: split sched scan IEs) introduced the len variable to keep track of the return value of ieee80211_build_preq_ies() but did not use it. Compiling with W=1 gives the following warning, fix it. net/mac80211/scan.c: In function ‘__ieee80211_request_sched_scan_start’: net/mac80211/scan.c:1123:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] This is a harmless warning and is only being fixed to reduce the noise with W=1 in the kernel. Fixes: 633e27132625 ("mac80211: split sched scan IEs") Cc: David Spinadel Cc: Alexander Bondar Cc: Johannes Berg Signed-off-by: Kirtika Ruchandani --- net/mac80211/scan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 23d8ac8..faab3c4 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -1120,7 +1120,6 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, u32 rate_masks[NUM_NL80211_BANDS] = {}; u8 bands_used = 0; u8 *ie; - size_t len; iebufsz = local->scan_ies_len + req->ie_len; @@ -1145,10 +1144,9 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, ieee80211_prepare_scan_chandef(&chandef, req->scan_width); - len = ieee80211_build_preq_ies(local, ie, num_bands * iebufsz, - &sched_scan_ies, req->ie, - req->ie_len, bands_used, - rate_masks, &chandef); + ieee80211_build_preq_ies(local, ie, num_bands * iebufsz, + &sched_scan_ies, req->ie, + req->ie_len, bands_used, rate_masks, &chandef); ret = drv_sched_scan_start(local, sdata, req, &sched_scan_ies); if (ret == 0) {