diff mbox series

[net-next,3/4] net: phy: mxl-gpy: rename the FW type field name

Message ID 20220712131554.2737792-4-michael@walle.cc (mailing list archive)
State Accepted
Commit 1e9aa7baf0965443350c8751f328bc671550d718
Delegated to: Netdev Maintainers
Headers show
Series net: phy: mxl-gpy: version fix and improvements | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 38 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Michael Walle July 12, 2022, 1:15 p.m. UTC
Align the firmware field name with the reference manual where it is
called "major".

Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/net/phy/mxl-gpy.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Andrew Lunn July 12, 2022, 1:26 p.m. UTC | #1
On Tue, Jul 12, 2022 at 03:15:53PM +0200, Michael Walle wrote:
> Align the firmware field name with the reference manual where it is
> called "major".
> 
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index b6303089d425..ac62b01c61ed 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -56,7 +56,7 @@ 
 				 PHY_IMASK_ANC)
 
 #define PHY_FWV_REL_MASK	BIT(15)
-#define PHY_FWV_TYPE_MASK	GENMASK(11, 8)
+#define PHY_FWV_MAJOR_MASK	GENMASK(11, 8)
 #define PHY_FWV_MINOR_MASK	GENMASK(7, 0)
 
 /* SGMII */
@@ -78,12 +78,12 @@ 
 #define WOL_EN			BIT(0)
 
 struct gpy_priv {
-	u8 fw_type;
+	u8 fw_major;
 	u8 fw_minor;
 };
 
 static const struct {
-	int type;
+	int major;
 	int minor;
 } ver_need_sgmii_reaneg[] = {
 	{7, 0x6D},
@@ -222,7 +222,7 @@  static int gpy_probe(struct phy_device *phydev)
 	fw_version = phy_read(phydev, PHY_FWV);
 	if (fw_version < 0)
 		return fw_version;
-	priv->fw_type = FIELD_GET(PHY_FWV_TYPE_MASK, fw_version);
+	priv->fw_major = FIELD_GET(PHY_FWV_MAJOR_MASK, fw_version);
 	priv->fw_minor = FIELD_GET(PHY_FWV_MINOR_MASK, fw_version);
 
 	ret = gpy_hwmon_register(phydev);
@@ -242,7 +242,7 @@  static bool gpy_sgmii_need_reaneg(struct phy_device *phydev)
 	size_t i;
 
 	for (i = 0; i < ARRAY_SIZE(ver_need_sgmii_reaneg); i++) {
-		if (priv->fw_type != ver_need_sgmii_reaneg[i].type)
+		if (priv->fw_major != ver_need_sgmii_reaneg[i].major)
 			continue;
 		if (priv->fw_minor < ver_need_sgmii_reaneg[i].minor)
 			return true;