On Wed, May 11, 2022 at 1:58 PM Marek Behún <marek.be...@nic.cz> wrote:
>
> On Tue, 10 May 2022 15:49:10 -0700
> Tim Harvey <thar...@gateworks.com> 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 <thar...@gateworks.com>
> > Cc: Marek Behún <marek.be...@nic.cz>
> > Cc: Stefan Roese <s...@denx.de>
> > Cc: Ramon Fried <rfried....@gmail.com>
> > Cc: Vladimir Oltean <vladimir.olt...@nxp.com>
> > ---
> >  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];
>
> Yikes.
>
> Reviewed-by: Marek Behún <marek.be...@nic.cz>
Reviewed-by: Ramon Fried <rfried....@gmail.com>

Reply via email to