* [PATCH] net: fix phy_string_for_interface
@ 2022-05-10 22:49 Tim Harvey
2022-05-11 5:00 ` Stefan Roese
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Tim Harvey @ 2022-05-10 22:49 UTC (permalink / raw)
To: Joe Hershberger, Ramon Fried, u-boot
Cc: Tim Harvey, Marek Behún, Stefan Roese, Vladimir Oltean
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];
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix phy_string_for_interface
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
2022-05-23 17:58 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Stefan Roese @ 2022-05-11 5:00 UTC (permalink / raw)
To: Tim Harvey, Joe Hershberger, Ramon Fried, u-boot
Cc: Marek Behún, Vladimir Oltean
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@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>
Reviewed-by: Stefan Roese <sr@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@denx.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix phy_string_for_interface
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
2022-05-16 0:26 ` Ramon Fried
2022-05-23 17:58 ` Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Marek Behún @ 2022-05-11 10:58 UTC (permalink / raw)
To: Tim Harvey
Cc: Joe Hershberger, Ramon Fried, u-boot, Stefan Roese,
Vladimir Oltean
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix phy_string_for_interface
2022-05-11 10:58 ` Marek Behún
@ 2022-05-16 0:26 ` Ramon Fried
0 siblings, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2022-05-16 0:26 UTC (permalink / raw)
To: Marek Behún
Cc: Tim Harvey, Joe Hershberger, U-Boot Mailing List, Stefan Roese,
Vladimir Oltean
On Wed, May 11, 2022 at 1:58 PM Marek Behún <marek.behun@nic.cz> wrote:
>
> 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>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix phy_string_for_interface
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
@ 2022-05-23 17:58 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-05-23 17:58 UTC (permalink / raw)
To: Tim Harvey
Cc: Joe Hershberger, Ramon Fried, u-boot, Marek Behún,
Stefan Roese, Vladimir Oltean
[-- Attachment #1: Type: text/plain, Size: 719 bytes --]
On Tue, May 10, 2022 at 03:49:10PM -0700, 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@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>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-23 17:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-05-16 0:26 ` Ramon Fried
2022-05-23 17:58 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox