]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: fman_memac: Don't use of_property_read_bool on non-boolean property managed
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 10 Jun 2025 11:40:56 +0000 (13:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Jun 2025 21:26:22 +0000 (14:26 -0700)
'managed' is a non-boolean property specified in ethernet-controller.yaml.
Since commit c141ecc3cecd7 ("of: Warn when of_property_read_bool() is
used on non-boolean properties") this raises a warning. Use the
replacement of_property_present() instead.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://patch.msgid.link/20250610114057.414791-1-alexander.stein@ew.tq-group.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/fman/fman_memac.c

index 3925441143fac9eecc40ea45d05f36be63b16a78..0291093f2e4e45b277bab2b9da2977c9e1a5468e 100644 (file)
@@ -1225,7 +1225,7 @@ int memac_initialization(struct mac_device *mac_dev,
         * be careful and not enable this if we are using MII or RGMII, since
         * those configurations modes don't use in-band autonegotiation.
         */
-       if (!of_property_read_bool(mac_node, "managed") &&
+       if (!of_property_present(mac_node, "managed") &&
            mac_dev->phy_if != PHY_INTERFACE_MODE_MII &&
            !phy_interface_mode_is_rgmii(mac_dev->phy_if))
                mac_dev->phylink_config.default_an_inband = true;