]> www.infradead.org Git - users/hch/misc.git/commitdiff
of: mdio: warn if deprecated fixed-link binding is used
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 12 Sep 2025 19:06:12 +0000 (21:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Sep 2025 01:15:41 +0000 (18:15 -0700)
The array-style fixed-link binding has been marked deprecated for more
than 10 yrs, but still there's a number of users. Print a warning when
usage of the deprecated binding is detected.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/faf94844-96eb-400f-8a3a-b2a0e93b27d7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/mdio/of_mdio.c

index d8ca63ed871944a4e330e3897459e2434ec78a45..1357348e01d5f96c7d86742cffa4dea7c250b4fb 100644 (file)
@@ -447,6 +447,8 @@ int of_phy_register_fixed_link(struct device_node *np)
        /* Old binding */
        if (of_property_read_u32_array(np, "fixed-link", fixed_link_prop,
                                       ARRAY_SIZE(fixed_link_prop)) == 0) {
+               pr_warn_once("%pOF uses deprecated array-style fixed-link binding!\n",
+                            np);
                status.link = 1;
                status.duplex = fixed_link_prop[1];
                status.speed  = fixed_link_prop[2];