public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <marek.behun@nic.cz>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>,
	u-boot@lists.denx.de, Stefan Roese <sr@denx.de>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH] net: fix phy_string_for_interface
Date: Wed, 11 May 2022 12:58:20 +0200	[thread overview]
Message-ID: <20220511125820.58a0126a@thinkpad> (raw)
In-Reply-To: <20220510224910.12553-1-tharvey@gateworks.com>

On Tue, 10 May 2022 15:49:10 -0700
Tim Harvey <tharvey@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 <tharvey@gateworks.com>
> Cc: Marek Behún <marek.behun@nic.cz>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Cc: Vladimir Oltean <vladimir.oltean@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.behun@nic.cz>

  parent reply	other threads:[~2022-05-11 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 22:49 [PATCH] net: fix phy_string_for_interface Tim Harvey
2022-05-11  5:00 ` Stefan Roese
2022-05-11 10:58 ` Marek Behún [this message]
2022-05-16  0:26   ` Ramon Fried
2022-05-23 17:58 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220511125820.58a0126a@thinkpad \
    --to=marek.behun@nic.cz \
    --cc=joe.hershberger@ni.com \
    --cc=rfried.dev@gmail.com \
    --cc=sr@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox