realtek: mdio: fix non-debug SerDes builds
authorMarkus Stockhausen <[email protected]>
Thu, 18 Sep 2025 05:34:27 +0000 (01:34 -0400)
committerRobert Marko <[email protected]>
Thu, 18 Sep 2025 08:44:35 +0000 (10:44 +0200)
commitab492973342ce32cd3e3de98c885dfeb69446432
tree0c9b2cfc9c72a3dfc753cd4e84753578d37e28ea
parentaf3ae2ae84f0eda22ea9034f4746a54abf529d52
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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20078
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto-serdes.c