lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoV3ld1UI3lA2/pF@localhost.localdomain>
Date: Wed, 3 Jul 2024 18:08:53 +0200
From: Michal Kubiak <michal.kubiak@...el.com>
To: Christian Eggers <ceggers@...i.de>
CC: Andrew Lunn <andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>, "David S . Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Juergen Beisert
	<jbe@...gutronix.de>, Stefan Roese <sr@...x.de>, Juergen Borleis
	<kernel@...gutronix.de>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 2/2] dsa: lan9303: consistent naming for PHY address
 parameter

On Wed, Jul 03, 2024 at 04:57:18PM +0200, Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.
> 
> Signed-off-by: Christian Eggers <ceggers@...i.de>
> ---
>  drivers/net/dsa/lan9303_mdio.c | 8 ++++----
>  include/linux/dsa/lan9303.h    | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dsa/lan9303_mdio.c b/drivers/net/dsa/lan9303_mdio.c
> index 167a86f39f27..0ac4857e5ee8 100644
> --- a/drivers/net/dsa/lan9303_mdio.c
> +++ b/drivers/net/dsa/lan9303_mdio.c
> @@ -58,19 +58,19 @@ static int lan9303_mdio_read(void *ctx, uint32_t reg, uint32_t *val)
>  	return 0;
>  }
>  
> -static int lan9303_mdio_phy_write(struct lan9303 *chip, int phy, int reg,
> +static int lan9303_mdio_phy_write(struct lan9303 *chip, int addr, int reg,
>  				  u16 val)
>  {
>  	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
>  
> -	return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val);
> +	return mdiobus_write_nested(sw_dev->device->bus, addr, reg, val);
>  }
>  
> -static int lan9303_mdio_phy_read(struct lan9303 *chip, int phy,  int reg)
> +static int lan9303_mdio_phy_read(struct lan9303 *chip, int addr, int reg)
>  {
>  	struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev);
>  
> -	return mdiobus_read_nested(sw_dev->device->bus, phy, reg);
> +	return mdiobus_read_nested(sw_dev->device->bus, addr, reg);
>  }
>  
>  static const struct lan9303_phy_ops lan9303_mdio_phy_ops = {
> diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
> index b4f22112ba75..3ce7cbcc37a3 100644
> --- a/include/linux/dsa/lan9303.h
> +++ b/include/linux/dsa/lan9303.h
> @@ -5,8 +5,8 @@ struct lan9303;
>  
>  struct lan9303_phy_ops {
>  	/* PHY 1 and 2 access*/
> -	int	(*phy_read)(struct lan9303 *chip, int port, int regnum);
> -	int	(*phy_write)(struct lan9303 *chip, int port,
> +	int	(*phy_read)(struct lan9303 *chip, int addr, int regnum);
> +	int	(*phy_write)(struct lan9303 *chip, int addr,
>  			     int regnum, u16 val);
>  };
>  
> -- 
> 2.43.0
> 
> 

Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ