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: 10722445 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B78F6C5 for ; Mon, 10 Dec 2018 20:56:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BEE32A410 for ; Mon, 10 Dec 2018 20:56:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F8312A43D; Mon, 10 Dec 2018 20:56:18 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 A9B0B2A410 for ; Mon, 10 Dec 2018 20:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729781AbeLJU4L (ORCPT ); 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-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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Hans de Goede --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)