[openwrt/openwrt] bcm47xx: fix no previous prototype error
LEDE Commits
lede-commits at lists.infradead.org
Tue Nov 4 23:39:36 PST 2025
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f91e205286aa0e3f60a8102c344ff14d9c1b96e1
commit f91e205286aa0e3f60a8102c344ff14d9c1b96e1
Author: Kyle Hendry <kylehendrydev at gmail.com>
AuthorDate: Tue Nov 4 17:59:13 2025 -0800
bcm47xx: fix no previous prototype error
Make functions in b53 static and add kernel
patch to fix prototype build errors
Signed-off-by: Kyle Hendry <kylehendrydev at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20653
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
.../980-no-previous-protoype-fixes.patch | 22 ++++++++++++++++++++++
.../generic/files/drivers/net/phy/b53/b53_common.c | 2 +-
.../generic/files/drivers/net/phy/b53/b53_mdio.c | 4 ++--
.../files/drivers/net/phy/b53/b53_phy_fixup.c | 2 +-
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/target/linux/bcm47xx/patches-6.6/980-no-previous-protoype-fixes.patch b/target/linux/bcm47xx/patches-6.6/980-no-previous-protoype-fixes.patch
new file mode 100644
index 0000000000..3c970df03d
--- /dev/null
+++ b/target/linux/bcm47xx/patches-6.6/980-no-previous-protoype-fixes.patch
@@ -0,0 +1,22 @@
+--- a/drivers/bcma/driver_chipcommon_sflash.c
++++ b/drivers/bcma/driver_chipcommon_sflash.c
+@@ -93,7 +93,7 @@ static void bcma_sflash_cmd(struct bcma_
+ bcma_err(cc->core->bus, "SFLASH control command failed (timeout)!\n");
+ }
+
+-const struct bcma_sflash_tbl_e *bcma_sflash_shrink_flash(u32 id)
++static const struct bcma_sflash_tbl_e *bcma_sflash_shrink_flash(u32 id)
+ {
+ enum bcm47xx_board board = bcm47xx_board_get();
+ const struct bcma_sflash_tbl_e *e;
+--- a/drivers/firmware/broadcom/cfe_env.c
++++ b/drivers/firmware/broadcom/cfe_env.c
+@@ -21,6 +21,8 @@
+ static char _nvdata[NVRAM_SIZE];
+ static char _valuestr[256];
+
++char *cfe_env_get(unsigned char *nv_buf, const char *name);
++
+ /*
+ * TLV types. These codes are used in the "type-length-value"
+ * encoding of the items stored in the NVRAM device (flash or EEPROM)
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index d5f9bfc2f0..ac37ef93b5 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -227,7 +227,7 @@ static void b53_set_vlan_entry(struct b53_device *dev, u16 vid, u16 members,
}
}
-void b53_set_forwarding(struct b53_device *dev, int enable)
+static void b53_set_forwarding(struct b53_device *dev, int enable)
{
u8 mgmt;
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
index c85df1f305..fdcebc703f 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
@@ -400,7 +400,7 @@ static struct phy_driver b53_phy_driver_id3 = {
.read_status = b53_phy_read_status,
};
-int __init b53_phy_driver_register(void)
+static int __init b53_phy_driver_register(void)
{
int ret;
@@ -422,7 +422,7 @@ err1:
return ret;
}
-void __exit b53_phy_driver_unregister(void)
+static void __exit b53_phy_driver_unregister(void)
{
phy_driver_unregister(&b53_phy_driver_id3);
phy_driver_unregister(&b53_phy_driver_id2);
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
index a19eccefd1..5a415071b8 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
@@ -47,7 +47,7 @@ static int b53_phy_fixup(struct phy_device *dev)
return 0;
}
-int __init b53_phy_fixup_register(void)
+static int __init b53_phy_fixup_register(void)
{
return phy_register_fixup_for_id(PHY_ANY_ID, b53_phy_fixup);
}
More information about the lede-commits
mailing list