From: Tim Harvey Date: Tue, 10 May 2022 22:49:10 +0000 (-0700) Subject: net: fix phy_string_for_interface X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=faa6ce6061a03617785310ccbc5436a56cce4ab4;p=u-boot.git net: fix phy_string_for_interface commit ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA") broke the phy_string_for_interface function. Fix it. Fixes ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA") Signed-off-by: Tim Harvey Cc: Marek BehĂșn Cc: Stefan Roese Cc: Ramon Fried Cc: Vladimir Oltean Reviewed-by: Stefan Roese Reviewed-by: Marek BehĂșn Reviewed-by: Ramon Fried --- diff --git a/include/phy_interface.h b/include/phy_interface.h index ce3b5004ec..fed3357b9a 100644 --- a/include/phy_interface.h +++ b/include/phy_interface.h @@ -85,7 +85,7 @@ static const char * const backplane_mode_strings[] = { static inline const char *phy_string_for_interface(phy_interface_t i) { /* Default to unknown */ - if (i > PHY_INTERFACE_MODE_NA) + if (i >= PHY_INTERFACE_MODE_MAX) i = PHY_INTERFACE_MODE_NA; return phy_interface_strings[i];