From patchwork Mon Oct 17 22:13:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101673 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp596997qge; Mon, 17 Oct 2016 15:16:40 -0700 (PDT) X-Received: by 10.98.3.65 with SMTP id 62mr35934873pfd.98.1476742600545; Mon, 17 Oct 2016 15:16:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si31178517pfg.226.2016.10.17.15.16.40; Mon, 17 Oct 2016 15:16:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758837AbcJQWQc (ORCPT + 1 other); Mon, 17 Oct 2016 18:16:32 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:49231 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754096AbcJQWQO (ORCPT ); Mon, 17 Oct 2016 18:16:14 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0LwVGF-1d1jtG31bT-018Lsy; Tue, 18 Oct 2016 00:16:01 +0200 From: Arnd Bergmann To: Arend van Spriel Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann , Hante Meuleman , Kalle Valo , Franky Lin , Pieter-Paul Giesberts , "Franky (Zhenhui) Lin" , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, netdev@vger.kernel.org Subject: [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap Date: Tue, 18 Oct 2016 00:13:40 +0200 Message-Id: <20161017221355.1861551-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161017220342.1627073-1-arnd@arndb.de> References: <20161017220342.1627073-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:q2kZvtLBMQHnMDn30csCKkuVK0iledQXOx6x+zYZpTEG+PpZ5MV M8bP3XnqhyNRwDCo668xp42DRR7inizZLG8g9swt0eQQ0rbAt882qIaoJ++hRwTa6yG13fL 6CqhDqpsDTdFruC1D4aRTiiQ9ZYL+CX9mxnd5UkgzgosIQC7/AU0r5GWOwB67R4XY7cAjy7 vXcVPZf50fjo7oV2mOxPg== X-UI-Out-Filterresults: notjunk:1; V01:K0:JIxxCahLZD0=:JYWnj8AeaZ1mbHuzBwqDLM gBuehhrAX6LWkxj7DJxlg+3UMLrwBo8ZJPL9YiUBqUAJkhqHocSrmLOrCZN+PDlRZwkOiIuH8 86yR+kMgsBsgv4xKZ5l3nVHK2PpAbbCPWrBHlcnUT0vcZECEC/NiqEClxVXuSpX6yLa7jV9B9 fb7ASb8sx8kcsAi2i17HO5XIUCg4oHffq1v6O6/9QQSs9ELUGKh98MUTw4D47zR2SsgZW/Mm7 IjYjyQ9qRsgAumk8BAxiGz/R8kpwMSRmQ9fG+dXSxcFe3l/TqdIG5yeRDFawsQMup/WWPPY4E F/MkozPa2YDSMB6zGcvtdKhEYJHshfFKjziPJc510/c9qx+kb1SnyLjPn7lp5Sh0RzIrPOZeT MallUja38x4Q+qqAxRZhmePNn0qd7NkQ0JgxCeMRrAec4lfzCccG3JRZXsfvBt+wHTUOnPrZc 05l0Obns4+AoIwxEkatLR1QvBcJHkWTEvnZWBgNqJSeE2ykus0UJ4CpWaNJvZ/tLiNNfmFnqn B+8l/wnMoOZn5oDXliOGO3tlKL1maOQfj2IbHrSMX06kPTFxY+gLWFvQ1hu/NxvMK3+ag4yCP g9ndsmX5YIEWeVrQEKi3U2wp/2PMXP0OGpyJooNvmuZIvvbkTLW0FckU8qEPcUO/G5ES09ua+ l/mCRcZ2QyyNbBk8JUw3GzJWvEbUTzSoyrsERz0i229gJdXOMqW6I7Ah+7Y79JZqQ30tdkjSC 9UJNcsZl1r5aMRZV Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org A bugfix added a sanity check around the assignment and use of the 'is_11d' variable, which looks correct to me, but as the function is rather complex already, this confuses the compiler to the point where it can no longer figure out if the variable is always initialized correctly: brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’: brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for the newly introduced case in which the variable should not really be used, in order to make the warning go away. Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") Cc: Hante Meuleman Cc: Arend van Spriel Cc: Kalle Valo Signed-off-by: Arnd Bergmann --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index b777e1b..78d9966 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4516,7 +4516,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, /* store current 11d setting */ if (brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_REGULATORY, &ifp->vif->is_11d)) { - supports_11d = false; + is_11d = supports_11d = false; } else { country_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail, settings->beacon.tail_len,