]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
bcm47xx: fix no previous prototype error 20653/head
authorKyle Hendry <kylehendrydev@gmail.com>
Wed, 5 Nov 2025 01:59:13 +0000 (17:59 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 5 Nov 2025 07:39:07 +0000 (08:39 +0100)
Make functions in b53 static and add kernel
patch to fix prototype build errors

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20653
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/bcm47xx/patches-6.6/980-no-previous-protoype-fixes.patch [new file with mode: 0644]
target/linux/generic/files/drivers/net/phy/b53/b53_common.c
target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c

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 (file)
index 0000000..3c970df
--- /dev/null
@@ -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)
index d5f9bfc2f0438b0c292105ac4a1765c0daca9a6a..ac37ef93b5adb3a4363bdaf5b371997efd13e7ef 100644 (file)
@@ -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;
 
index c85df1f3055801b9222e6073e7e5e57f7a1192c9..fdcebc703ff4cfb0f46528891e76f3eb80726156 100644 (file)
@@ -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);
index a19eccefd14c5bb96d1054f60396cba90e0ea23a..5a415071b8f775f58512db7f9b2fa69206bb2b6b 100644 (file)
@@ -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);
 }