From patchwork Mon Dec 10 20:55:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 153353 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4002281ljp; Mon, 10 Dec 2018 12:56:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/VqkXmvGElCWNShD4IcAd/CaNF8VUKrRuNuBH+WR1NwlbVWo4vZbAeoAMubQBnbBmOP/2or X-Received: by 2002:a62:5dd1:: with SMTP id n78mr13543116pfj.58.1544475373096; Mon, 10 Dec 2018 12:56:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544475373; cv=none; d=google.com; s=arc-20160816; b=QbcxFLfwNW3Lm8H8H6EWr68rOMZwfIf2gJlOeKtZr6+cWLMHYFUt0pnDZtkoBmd6lj EBTPcwoV1vDfGlsB2qwdf1UaT4eY6diBFSWJBwwulZTNfi3pFachgXHUNOU+WK/j/fwK VnwcZFH/Zi9TRsafK/c5AWpOSFn8O+xOCAhnX0lSxW1uNhAUfoIv14uHWpqdXxuPcMzg sJBaPZV8Ppguh7es7Wglvm4db/WCAMJfetBLCF4YRkQIRZxFkeHddbhur2lKdrJIM9TO SJ/NX2bbbKVGi0XQQ0UvtjfBgwgGBuAXcIRQiJnBq/3DYz5PADXWd8OiNfXd1f219gTl 4czw== 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 :message-id:date:subject:cc:to:from; bh=02usFoRrcc8QsikOH3uEY5MKxpVoNM2e9F3H5AevTa0=; b=qTa6OVBOlFDgx7C1JeQcPP26QmCnL5TJuU2wi2H/TjiMmnm1CaihP7Yb3KLJcCSBsA EoBjQbl6z0VBtHm0xKBCG+dX5OSda9uR+7NE2m5nhUjHLoD93DOa6Kf+v9l4Lhln0FjK C/xhwDK8yhRaOkH2x6AC+ahaOm4xx53m8kPH2aC4oDV601rAzWqOTM+uYBnUSHJUj8I8 QtO3QY0i0tJunRmOUID9Occqoxn/3nniohZJ3bnEb+R6QfwCZwBfVa9eU6j1gHho7L2t 0Crxn26b17qT4zB6iZpAGp2mMl+1VBEl7sNfgmB5ojFhvnvY/hiB3S0SY7uZsXomiXn1 1lwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si9974092pgl.122.2018.12.10.12.56.12; Mon, 10 Dec 2018 12:56:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729863AbeLJU4L (ORCPT + 31 others); Mon, 10 Dec 2018 15:56:11 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:36593 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728820AbeLJU4L (ORCPT ); Mon, 10 Dec 2018 15:56:11 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MI4gb-1giIxv4611-00FFce; Mon, 10 Dec 2018 21:55:57 +0100 From: Arnd Bergmann To: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng Cc: Arnd Bergmann , Kalle Valo , "David S. Miller" , Hans de Goede , Pieter-Paul Giesberts , Lyude Paul , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] brcmfmac: fix false-positive -Wmaybe-unintialized warning Date: Mon, 10 Dec 2018 21:55:37 +0100 Message-Id: <20181210205555.3000038-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:c8n9oVnht6yZZdMzFzt2ov1KCDmfjSTO3yfd/Y3Hf0zedJgmk8S 8ObgdgUO9jIrpTjvsloM4TwvKT55C02zMsVHvH9ayHgEFIMd1fE6y4ITk0MViFJ1397y5V7 FZeLvPPAAuZGPTQiIMH6rX1U1PnMd6ys/q7ogqow5e/vqtrXzja+gjhjjjCS8N9g9bK7UOh d/anCt5O4kNK29fPw6CZg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:hoUXMykC07g=:s/27cROxD2vRSf6qo/o9zb YaWdDBnJ9LZ4DJM4B2fHYXgSidQFp00iGfjxoFeb+ZiddIhx0whGR4ZwJBnBZhrNHMd0fWBP2 VKs+ugL6hWsrWcmCinbU2v5WsONOF0dydaIWyG1/P0BoXcOCeeVsQMRs5jMaO1rI5faOzvhgP TgTmuykYgnN3XXmlhbTr4KFcvEg5BKhltI9NjJ2P4FjmRLT6QT2Lae3sC3TgyJ4MBZqUoB3ya q0+z7YLFpwEV/N5+KugTm6BR5OcSaiAcxVRndGmYd4L9YpF3qnMlLSfE1DqgMza4v93x6CxaE eP8puk/kr5Rz8P3YAjqnzTKFoKAWQHGMORNjGxKNO7tmgpQSuUQbmzCm5PujItOHygRIMxL2S cBwx8d59jstig3d9mfiXMB9q0l16u1T+Ih/QUZ5EE06uic+uJrkENDWF6CDBS/ukQOA2XShIQ 94y/DCFaXPdvP0Ty0aPStHjwNwdatJnGGABQaolN281rxT///Y1GPiB1HQecvp4T4ubJ7STRD V1KsawqMkv0pRiCVWhTlr0l7NV09H945rhLYk/F3jh/pU+z3PdkdxSp/2GdgMaHc1VAOXeYiy rxc+3/B4gaSkdgZrw8HXePsOuXe6iciCKJnSpt3KELNojlzKhKV2JqbSZVHT40acTyqWu8uZP s1N5FoFWf3oWNbMh6xPIcEKlmMMlijreJENoLZ3pBjhXFHFyAjGIWZzh/uZI6UxTTiFsB/Tfy 2xrIV9rsmurXv7GcjLUyATlINGU+j04ecpUOVQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_NO_AUTO_INLINE is set, we get a false-postive warning for the brcmf_fw_request_nvram_done() function, after gcc figures out that brcmf_fw_nvram_from_efi() might not set the 'data_len' variable, but fails to notice that it always returns NULL: drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c: In function 'brcmf_fw_request_nvram_done': drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:560:11: error: 'data_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] Mark it 'inline' to force gcc to understand this. Fixes: ce2e6db554fa ("brcmfmac: Add support for getting nvram contents from EFI variables") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c index dad3c1c79038..14b948917a1a 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c @@ -512,7 +512,7 @@ static u8 *brcmf_fw_nvram_from_efi(size_t *data_len_ret) return NULL; } #else -static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; } +static inline u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; } #endif static void brcmf_fw_free_request(struct brcmf_fw_request *req)