diff mbox series

[net,2/2] dsa: lan9303: consistent naming for PHY address parameter

Message ID 20240703145718.19951-2-ceggers@arri.de (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net,1/2] dsa: lan9303: Fix mapping between DSA port number and PHY address | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 856 this patch: 856
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 860 this patch: 860
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 860 this patch: 860
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 33 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-04--21-00 (tests: 694)

Commit Message

Christian Eggers July 3, 2024, 2:57 p.m. UTC
Name it 'addr' instead of 'port' or 'phy'.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 drivers/net/dsa/lan9303_mdio.c | 8 ++++----
 include/linux/dsa/lan9303.h    | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Michal Kubiak July 3, 2024, 4:08 p.m. UTC | #1
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@arri.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@intel.com>
Florian Fainelli July 4, 2024, 2:51 p.m. UTC | #2
On 7/3/2024 3:57 PM, Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.
> 
> Signed-off-by: Christian Eggers <ceggers@arri.de>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Jakub Kicinski July 5, 2024, 2:20 a.m. UTC | #3
On Wed, 3 Jul 2024 16:57:18 +0200 Christian Eggers wrote:
> Name it 'addr' instead of 'port' or 'phy'.

Unfortunately the fix has narrowly missed today's PR.
Please resend this for net-next in a week+.
diff mbox series

Patch

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);
 };