[openwrt/openwrt] mac80211: brcm: fix compilation warning for unused brcmf_of_fwnames
LEDE Commits
lede-commits at lists.infradead.org
Thu May 11 18:24:52 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b545df5cfd4a8d4cb6656ac79a5cfc0eed9971c0
commit b545df5cfd4a8d4cb6656ac79a5cfc0eed9971c0
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat May 6 19:28:36 2023 +0200
mac80211: brcm: fix compilation warning for unused brcmf_of_fwnames
If CPTCFG_BRCMFMAC_SDIO is not used brcmf_of_fwnames is defined but not
used in the case of CONFIG_OF not compiled.
Restrict brcmf_of_fwnames only with CPTCFG_BRCMFMAC_SDIO selected.
Fix compilation warning:
/__w/openwrt/openwrt/openwrt/build_dir/target-x86_64-openwrt-linux-musl_musl/linux-x86_64/backports-6.1.24/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h:16:1: error: 'brcmf_of_fwnames' defined but not used [-Werror=unused-function]
16 | brcmf_of_fwnames(struct device *dev, u32 *map_count)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
.../brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch
index 8ed81f600a..8df285f8b1 100644
--- a/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch
+++ b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch
@@ -65,22 +65,26 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+}
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h
-@@ -5,9 +5,16 @@
+@@ -5,9 +5,20 @@
#ifdef CONFIG_OF
void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
struct brcmf_mp_device *settings);
++#ifdef CPTCFG_BRCMFMAC_SDIO
+struct brcmf_firmware_mapping *
+brcmf_of_fwnames(struct device *dev, u32 *map_count);
++#endif
#else
static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
struct brcmf_mp_device *settings)
{
}
++#ifdef CPTCFG_BRCMFMAC_SDIO
+static struct brcmf_firmware_mapping *
+brcmf_of_fwnames(struct device *dev, u32 *map_count)
+{
+ return NULL;
+}
++#endif
#endif /* CONFIG_OF */
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
More information about the lede-commits
mailing list