[PATCH u-boot-net 08/14] treewide: Rename PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX

Stefan Roese sr at denx.de
Fri Mar 18 08:34:21 CET 2022


On 3/17/22 13:49, Marek Behún wrote:
> From: Marek Behún <marek.behun at nic.cz>
> 
> Rename constant PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX to
> make it compatible with Linux' naming.
> 
> Signed-off-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/core/ofnode.c      | 2 +-
>   drivers/net/phy/aquantia.c | 2 +-
>   include/phy_interface.h    | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
> index 191ab63a5d..b9c334c46d 100644
> --- a/drivers/core/ofnode.c
> +++ b/drivers/core/ofnode.c
> @@ -1198,7 +1198,7 @@ phy_interface_t ofnode_read_phy_mode(ofnode node)
>   	if (!mode)
>   		return PHY_INTERFACE_MODE_NONE;
>   
> -	for (i = 0; i < PHY_INTERFACE_MODE_COUNT; i++)
> +	for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++)
>   		if (!strcmp(mode, phy_interface_strings[i]))
>   			return i;
>   
> diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
> index 83075f78c9..7e950fe0c2 100644
> --- a/drivers/net/phy/aquantia.c
> +++ b/drivers/net/phy/aquantia.c
> @@ -305,7 +305,7 @@ struct {
>   	u16 syscfg;
>   	int cnt;
>   	u16 start_rate;
> -} aquantia_syscfg[PHY_INTERFACE_MODE_COUNT] = {
> +} aquantia_syscfg[PHY_INTERFACE_MODE_MAX] = {
>   	[PHY_INTERFACE_MODE_SGMII] =      {0x04b, AQUANTIA_VND1_GSYSCFG_1G,
>   					   AQUANTIA_VND1_GSTART_RATE_1G},
>   	[PHY_INTERFACE_MODE_2500BASEX]  = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G,
> diff --git a/include/phy_interface.h b/include/phy_interface.h
> index f075abe9c9..494bc87e67 100644
> --- a/include/phy_interface.h
> +++ b/include/phy_interface.h
> @@ -41,7 +41,7 @@ typedef enum {
>   	PHY_INTERFACE_MODE_USXGMII,
>   	PHY_INTERFACE_MODE_NONE,	/* Must be last */
>   
> -	PHY_INTERFACE_MODE_COUNT,
> +	PHY_INTERFACE_MODE_MAX,
>   } phy_interface_t;
>   
>   static const char * const phy_interface_strings[] = {

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