diff mbox series

[net-next] net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet

Message ID 20221202144900.3298204-1-michael@walle.cc (mailing list archive)
State Accepted
Commit 343a5d358e4ab5597e90e1eafa7eba55eb42e96b
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet | 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 Single patches do not need cover letters
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, 26 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 Dec. 2, 2022, 2:49 p.m. UTC
Rename the temperature sensors macros to match the names in the
datasheet.

Signed-off-by: Michael Walle <michael@walle.cc>
---
For the curious: I probably copied the prefix from the already existing
VPSPEC2_ macros in the driver, the datasheet also mentions some VPSPEC2_
names, but I suspect they are typos.

 drivers/net/phy/mxl-gpy.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Andrew Lunn Dec. 2, 2022, 6:15 p.m. UTC | #1
On Fri, Dec 02, 2022 at 03:49:00PM +0100, Michael Walle wrote:
> Rename the temperature sensors macros to match the names in the
> datasheet.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>

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

    Andrew
patchwork-bot+netdevbpf@kernel.org Dec. 5, 2022, noon UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  2 Dec 2022 15:49:00 +0100 you wrote:
> Rename the temperature sensors macros to match the names in the
> datasheet.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> For the curious: I probably copied the prefix from the already existing
> VPSPEC2_ macros in the driver, the datasheet also mentions some VPSPEC2_
> names, but I suspect they are typos.
> 
> [...]

Here is the summary with links:
  - [net-next] net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet
    https://git.kernel.org/netdev/net-next/c/343a5d358e4a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 27c0f161623e..0ff7ef076072 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -78,8 +78,8 @@ 
 				 VSPEC1_SGMII_CTRL_ANRS)
 
 /* Temperature sensor */
-#define VPSPEC1_TEMP_STA	0x0E
-#define VPSPEC1_TEMP_STA_DATA	GENMASK(9, 0)
+#define VSPEC1_TEMP_STA	0x0E
+#define VSPEC1_TEMP_STA_DATA	GENMASK(9, 0)
 
 /* WoL */
 #define VPSPEC2_WOL_CTL		0x0E06
@@ -140,14 +140,14 @@  static int gpy_hwmon_read(struct device *dev,
 	struct phy_device *phydev = dev_get_drvdata(dev);
 	int ret;
 
-	ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VPSPEC1_TEMP_STA);
+	ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_TEMP_STA);
 	if (ret < 0)
 		return ret;
 	if (!ret)
 		return -ENODATA;
 
 	*value = polynomial_calc(&poly_N_to_temp,
-				 FIELD_GET(VPSPEC1_TEMP_STA_DATA, ret));
+				 FIELD_GET(VSPEC1_TEMP_STA_DATA, ret));
 
 	return 0;
 }