Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2019-01-11 14:15:19 +0100
committerMatthias Brugger <mbrugger@suse.com>2019-01-11 14:15:30 +0100
commit0cfb5bfac24c0abab646750c41af6eb3da643c15 (patch)
tree182bc89bacfda0dd59067b110d54a996c81e2107
parent90664f1c2bbe6257c5d0187e9419ae0c767a95de (diff)
brcmfmac: fix false-positive -Wmaybe-unintialized warning
-rw-r--r--patches.drivers/brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.drivers/brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch b/patches.drivers/brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch
new file mode 100644
index 0000000000..71787ce883
--- /dev/null
+++ b/patches.drivers/brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch
@@ -0,0 +1,42 @@
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 10 Dec 2018 21:55:37 +0100
+Subject: brcmfmac: fix false-positive -Wmaybe-unintialized warning
+Git-commit: 412dd15c8177d93abe0c8787b83b31c5eb061405
+Patch-mainline: v5.0
+References: fate#326215
+
+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>
+Signed-off-by: Matthias Brugger <mbrugger@suse.com>
+---
+ 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)
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 21880de503..9be0d1b268 100644
--- a/series.conf
+++ b/series.conf
@@ -42056,6 +42056,7 @@
patches.fixes/0001-fbdev-fbcon-Fix-unregister-crash-when-more-than-one-.patch
patches.suse/mm-page_alloc-do-not-wake-kswapd-with-zone-lock-held.patch
patches.drivers/brcmfmac-Call-brcmf_dmi_probe-before-brcmf_of_probe.patch
+ patches.drivers/brcmfmac-fix-false-positive-Wmaybe-unintialized-warn.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch