diff options
| author | Sven Eckelmann | 2025-11-23 11:49:24 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-11-24 23:28:49 +0000 |
| commit | 3e539b64476001f39a36da1e5d473bd6d19d6724 (patch) | |
| tree | 01e48c30b22b54c8413d3038927d7e58e4b0d7ed | |
| parent | 039c9802a1f8e52bccc4c3c9c752a4cb27641db7 (diff) | |
| download | openwrt-3e539b64476001f39a36da1e5d473bd6d19d6724.tar.gz | |
realtek: Remove extern from function declarations
In contrast to variables, functions don't need extern declarations. It is
also preferred in the kernel not to use extern in front of function
declarations.
The extern+static parts in clk-rtl83xx.c were skipped because they are a
little bit unexpected ("extern *_dram_set_rate" are never used, "static
_sram_set_rate" are used but should from the C code perspective always be
NULL). This is left for an interested reader with the correct test HW and
some interests to dig in the code from commit 4850bd887c3a ("realtek: add
RTL83XX clock driver") for the *_dram_set_rate -> *_sram_set_rate
relocation and how these SRAM function pointers are set in this translation
unit.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c | 2 | ||||
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c index 8c4880d9e4..ded16a480e 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c @@ -26,7 +26,7 @@ extern const struct rtl838x_reg rtl931x_reg; extern const struct dsa_switch_ops rtl83xx_switch_ops; extern const struct dsa_switch_ops rtl93xx_switch_ops; -extern struct phylink_pcs *rtpcs_create(struct device *dev, struct device_node *np, int port); +struct phylink_pcs *rtpcs_create(struct device *dev, struct device_node *np, int port); int rtl83xx_port_get_stp_state(struct rtl838x_switch_priv *priv, int port) { diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c index 2cdb726f9a..f937be226c 100644 --- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c @@ -25,7 +25,7 @@ extern struct rtl83xx_soc_info soc_info; -extern int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data); +int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data); /* Maximum number of RX rings is 8 on RTL83XX and 32 on the 93XX * The ring is assigned by switch based on packet/port priortity |