From patchwork Wed Aug 19 07:23:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 247928 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp243140ils; Wed, 19 Aug 2020 00:28:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZlkZc1csd01ZgkNJhdPSXcLtNulXjcpRfZ9DasGyBihd4sBFWNCYnKvWtMCzFlpHjzZa4 X-Received: by 2002:a17:906:4356:: with SMTP id z22mr24661630ejm.414.1597822100056; Wed, 19 Aug 2020 00:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597822100; cv=none; d=google.com; s=arc-20160816; b=dHSoFpm0yoeqtZKfFPW7qAFtAk9vdwBDoEoqZNO230pv/5nAr565eBHgTMUBmD+1oV 1ZZhG84Azi33nVLtMZmZ3iPfAYCEM/L+/iJ7DGgawFlAEPjx+zbfyPFRydydIFT12ZeW g1zRjKF6RBZddZNV71aPKJFFWq8i4sK5ZYB9vW9kF/hrmFD0pbyuiWJGwiM3eUSSqxrO 8W/gqQ90FUPO+G5owyUDL+haOXCwFpocAiEvR4j5XF7YAVF+qZnI39ZXTksNs6N818AW 8AcUxlTsS4JDvaqUnprtSvPCUfMGOMjUPYFPk7azh6L5iYCPJTL1nl4qRw7ANGASwBPK UBhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Dn1h7hnv+zK3JmNJ8owg74HJG3E/In8jlICFM66crSs=; b=AHlA/AHanuMxqPuiMYT2bAfTPxx63v4M1P4sSc+SBEAMUX8HgXf3qHsfiz1zjXobA9 1ck0dla0ypYgbN0Fq7boPHo5BIMfcHUsUwm5HnXTIHLvdWREpdRBpLv8RBgCSzqwQAul Jh2D3DXEAxHrdxeIempsjOrHrFXqqsVLnGZHMps9690X9Pr7xvt560mOrMuPP9g6spXu g4v7+UMkFN4Nf3iYaZTH2g1LDNZNd1a2cqpCTxfb0LCgArxcafcyAVBNejuNUbRIxL1l OGOi3OVqVpuWIQ0TBllGaPRBIN3QHW5mqvse3/UIFZy+qOmW3zlol6ybTVRH0kaXOICn JiAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AZWKgj9g; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck3si15043185edb.324.2020.08.19.00.28.19; Wed, 19 Aug 2020 00:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AZWKgj9g; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727807AbgHSH2Q (ORCPT + 9 others); Wed, 19 Aug 2020 03:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbgHSH0b (ORCPT ); Wed, 19 Aug 2020 03:26:31 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E866C0612F3 for ; Wed, 19 Aug 2020 00:24:38 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id p20so20474250wrf.0 for ; Wed, 19 Aug 2020 00:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dn1h7hnv+zK3JmNJ8owg74HJG3E/In8jlICFM66crSs=; b=AZWKgj9gDfQfz4GJLDtrB0WwHshxJJ7tcKzIGuAxvCXY9JzKaybqkdyFJo9GqxZ0EB cjb7K3Y0hkKjGydKVUNbOlWv2YrEYrWD7g5P/SMbHR+45oGCHSkNLx3MVrPUdpjQTGtK Cc9FeveNUUt+Y4PU4Yhf6vZX9l2NA9whyedEPeCib7kXNOVrtpOYtFngn+waNc8AKgTn 2NK1gJ/+W7poRuE6u7ADjEKynsQNLU6VZPXee25+pyeIPFCnytPKZqA7ENPd/mAX5NmE 4WVaZRSwfO+XjwDfcgIRx6ftAyW2axc4/qBRexeJlRo/He7ZhI6DmesCd5AhqnDy9Ls2 TDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dn1h7hnv+zK3JmNJ8owg74HJG3E/In8jlICFM66crSs=; b=DhVOAheI2DrVpG1+gqQbmDO8nGg9kXITHZdrcEcO+IwIjfryoCogALIrjIbJ4/oCPM gGySdQRVreujc6R0O7N7OR094Ji2J4mN+jswt00NJvkxx1EMbOs4+BHjG0SJsOS2kIf1 8RLsIeYXi/TYCK9i5542n6yuQXRoJUA6oaSNfg0LKVg0Y8IBOzTbk8AL/YczrblG4oVK 01vJ1HOH+VGBdNkBj1kIc8DcsGT1cbuSmGhl2RUCFMlu+ucGlXvjR+XIVXU9x5Yc5IDY BE91qKBtcFkovA1l3Drvzc8e9Pktv+RqE1uY0ifVV3BgEJn/Hmp0BX75iEEJYXiavjeC /C4g== X-Gm-Message-State: AOAM532dY7Jws395nDQDH8x/bSUJdedn1nmv2T+BRn1P7AfBdDC4z9Vq PGy7BaJjn319pnDC+Vt6mHQwLg== X-Received: by 2002:adf:9ed1:: with SMTP id b17mr22842002wrf.140.1597821876705; Wed, 19 Aug 2020 00:24:36 -0700 (PDT) Received: from dell.default ([95.149.164.62]) by smtp.gmail.com with ESMTPSA id c145sm3795808wmd.7.2020.08.19.00.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 00:24:36 -0700 (PDT) From: Lee Jones To: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Lee Jones , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com Subject: [PATCH 25/28] wireless: broadcom: brcmfmac: p2p: Deal with set but unused variables Date: Wed, 19 Aug 2020 08:23:59 +0100 Message-Id: <20200819072402.3085022-26-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200819072402.3085022-1-lee.jones@linaro.org> References: <20200819072402.3085022-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 'vif' is a function parameter which is oddly overwritten within the function, but never read back. 'timeout' is set, but never checked. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c: In function ‘brcmf_p2p_scan_prep’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:894:31: warning: parameter ‘vif’ set but not used [-Wunused-but-set-parameter] drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c: In function ‘brcmf_p2p_tx_action_frame’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1549:6: warning: variable ‘timeout’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.25.1 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index debd887e159e1..7f681a25ab525 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -913,8 +913,6 @@ int brcmf_p2p_scan_prep(struct wiphy *wiphy, if (err) return err; - vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; - /* override .run_escan() callback. */ cfg->escan_info.run = brcmf_p2p_run_escan; } @@ -1546,7 +1544,6 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, struct brcmf_cfg80211_vif *vif; struct brcmf_p2p_action_frame *p2p_af; s32 err = 0; - s32 timeout = 0; brcmf_dbg(TRACE, "Enter\n"); @@ -1582,8 +1579,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, (p2p->wait_for_offchan_complete) ? "off-channel" : "on-channel"); - timeout = wait_for_completion_timeout(&p2p->send_af_done, - P2P_AF_MAX_WAIT_TIME); + wait_for_completion_timeout(&p2p->send_af_done, P2P_AF_MAX_WAIT_TIME); if (test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status)) { brcmf_dbg(TRACE, "TX action frame operation is success\n");