summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi2025-04-11 09:45:13 +0000
committerChristian Marangi2025-04-11 18:34:24 +0000
commit473cfb4ff532210cfdd564b56f48aecf8b610e69 (patch)
tree050b797b5a827d0371e8c61975c18e62a2ed1155
parent0b5650f76783b215a6bfa22bde45973474a0d04f (diff)
downloadopenwrt-473cfb4ff532210cfdd564b56f48aecf8b610e69.tar.gz
generic: fix kernel warning no previous prototype for ...
It seems new kernel version introduced -Wmissing-prototypes. This new warning reported drivers that define non static function that are used statically in the driver. Fix this by declaring making those function actually static if not defined in any header and not used outside of the single driver. Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/18455 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8327.c12
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8366_smi.c6
-rw-r--r--target/linux/generic/files/drivers/net/phy/swconfig.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index ff9ff5df3c..d6749ad70e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -1210,7 +1210,7 @@ ar8327_sw_hw_apply(struct switch_dev *dev)
return 0;
}
-int
+static int
ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@@ -1228,7 +1228,7 @@ ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
return 0;
}
-int
+static int
ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@@ -1246,7 +1246,7 @@ ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
return 0;
}
-int
+static int
ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@@ -1263,7 +1263,7 @@ ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
return 0;
}
-int
+static int
ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@@ -1279,7 +1279,7 @@ ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
return 0;
}
-int
+static int
ar8327_sw_get_igmp_v3(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
@@ -1295,7 +1295,7 @@ ar8327_sw_get_igmp_v3(struct switch_dev *dev,
return 0;
}
-int
+static int
ar8327_sw_set_igmp_v3(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val)
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
index a26fd204cb..89fc04fa64 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
@@ -254,7 +254,7 @@ static int __rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
#define MDC_MDIO_WRITE_OP 0x0003
#define MDC_REALTEK_PHY_ADDR 0x0
-int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
+static int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
{
u32 phy_id = smi->phy_id;
struct mii_bus *mbus = smi->ext_mbus;
@@ -1527,7 +1527,7 @@ static void rtl8366_smi_reset(struct rtl8366_smi *smi, bool active)
reset_control_deassert(smi->reset);
}
-int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi)
+static int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi)
{
int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0);
int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0);
@@ -1577,7 +1577,7 @@ static inline int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8
}
#endif
-int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi)
+static int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi)
{
struct rtl8366_platform_data *pdata = pdev->dev.platform_data;
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 10dc8d0607..71dd5b31f5 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -1057,7 +1057,7 @@ static struct genl_family switch_fam = {
};
#ifdef CONFIG_OF
-void
+static void
of_switch_load_portmap(struct switch_dev *dev)
{
struct device_node *port;