[PATCH] net: fix phy_string_for_interface
Stefan Roese
sr at denx.de
Wed May 11 07:00:05 CEST 2022
On 11.05.22 00:49, Tim Harvey wrote:
> 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 <tharvey at gateworks.com>
> Cc: Marek Behún <marek.behun at nic.cz>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Ramon Fried <rfried.dev at gmail.com>
> Cc: Vladimir Oltean <vladimir.oltean at nxp.com>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
> include/phy_interface.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/phy_interface.h b/include/phy_interface.h
> index ce3b5004ec22..fed3357b9a26 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];
Viele Grüße,
Stefan Roese
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list