From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: [PATCH] brcmfmac: fix false-positive -Wmaybe-unintialized warning Date: Thu, 13 Dec 2018 14:52:28 +0000 (UTC) Message-ID: <20181213145232.28C0360960@smtp.codeaurora.org> References: <20181210205555.3000038-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Chi-Hsien Lin , Wright Feng , Arnd Bergmann , "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 To: Arnd Bergmann Return-path: In-Reply-To: <20181210205555.3000038-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Arnd Bergmann wrote: > 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 Commit ce2e6db554fa is in w-d-next so this should go to that tree as well. -- https://patchwork.kernel.org/patch/10722445/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches