diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-02-12 13:43:06 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-02-12 13:50:40 +0100 |
commit | 0994e65c6a32ea7009d1fe89f7261cb5d106c7a3 (patch) | |
tree | e4a154b66c4dbc65e3db1e8a5f1c4d7385cf7ce3 /package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch | |
parent | 248797834bf21916ddf663edc96d86ee5377850e (diff) | |
download | upstream-0994e65c6a32ea7009d1fe89f7261cb5d106c7a3.tar.gz upstream-0994e65c6a32ea7009d1fe89f7261cb5d106c7a3.tar.bz2 upstream-0994e65c6a32ea7009d1fe89f7261cb5d106c7a3.zip |
mac80211: brcmfmac: backport remaining patches from the Linux 5.0
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch')
-rw-r--r-- | package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch b/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch new file mode 100644 index 0000000000..5d454fd3ee --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/330-v5.0-0001-brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch @@ -0,0 +1,34 @@ +From 412dd15c8177d93abe0c8787b83b31c5eb061405 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann <arnd@arndb.de> +Date: Mon, 10 Dec 2018 21:55:37 +0100 +Subject: [PATCH] brcmfmac: fix false-positive -Wmaybe-unintialized warning + +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 <arnd@arndb.de> +Reviewed-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +@@ -512,7 +512,7 @@ fail: + 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) |