[openwrt/openwrt] realtek: mdio: fix non-debug SerDes builds
LEDE Commits
lede-commits at lists.infradead.org
Thu Sep 18 01:44:39 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ab492973342ce32cd3e3de98c885dfeb69446432
commit ab492973342ce32cd3e3de98c885dfeb69446432
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Sep 18 01:34:27 2025 -0400
realtek: mdio: fix non-debug SerDes builds
The new SerDes mdio driver produces the following compilation
error in non-debug builds.
drivers/net/mdio/mdio-realtek-otto-serdes.c:72:12:
error: 'rtsds_sds_to_mmd' defined but not used [-Werror=unused-function]
72 | static int rtsds_sds_to_mmd(int sds_page, int sds_regnum)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Move the function into the debug section.
Fixes: 7a7ee72c4d306e7 ("realtek: mdio: add SerDes driver")
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/20078
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
index 6296d1b6fe..441a620b46 100644
--- a/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
+++ b/target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c
@@ -69,12 +69,6 @@ static bool rtsds_mmd_to_sds(struct rtsds_ctrl *ctrl, int addr, int devad, int m
devad != MDIO_MMD_VEND1);
}
-static int rtsds_sds_to_mmd(int sds_page, int sds_regnum)
-{
- return FIELD_PREP(RTSDS_MMD_PAGE_MASK, sds_page) |
- FIELD_PREP(RTSDS_MMD_REG_MASK, sds_regnum);
-}
-
static int rtsds_get_backing_sds(int sds, int page)
{
/* non RTL931x devices have 1:1 frontend/backend mapping */
@@ -114,6 +108,12 @@ static const char * const rtsds_page_name[RTSDS_DBG_PAGE_NAMES] = {
[46] = "ANA_10G", [47] = "ANA_10G_EXT",
};
+static int rtsds_sds_to_mmd(int sds_page, int sds_regnum)
+{
+ return FIELD_PREP(RTSDS_MMD_PAGE_MASK, sds_page) |
+ FIELD_PREP(RTSDS_MMD_REG_MASK, sds_regnum);
+}
+
static int rtsds_dbg_registers_show(struct seq_file *seqf, void *unused)
{
struct rtsds_debug_info *dbg_info = seqf->private;
More information about the lede-commits
mailing list