* [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata()
@ 2025-10-17 19:35 Alok Tiwari
2025-10-17 19:35 ` [PATCH net-next 2/2] net: phy: micrel: fix typos in comments Alok Tiwari
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alok Tiwari @ 2025-10-17 19:35 UTC (permalink / raw)
To: hkallweit1, andrew, kuba, andrew+netdev, davem, edumazet, pabeni,
horms, linux, netdev, alok.a.tiwari
Cc: alok.a.tiwarilinux
ksz9477_phy_errata function currently assigns the return value of
genphy_restart_aneg() to a variable and then immediately returns it
err = genphy_restart_aneg(phydev);
if (err)
return err;
return err;
This can be simplified by directly returning the function call
result, as the intermediate variable and conditional are redundant.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/phy/micrel.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 79ce3eb6752b..65994d97c403 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -2095,11 +2095,7 @@ static int ksz9477_phy_errata(struct phy_device *phydev)
return err;
}
- err = genphy_restart_aneg(phydev);
- if (err)
- return err;
-
- return err;
+ return genphy_restart_aneg(phydev);
}
static int ksz9477_config_init(struct phy_device *phydev)
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/2] net: phy: micrel: fix typos in comments
2025-10-17 19:35 [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Alok Tiwari
@ 2025-10-17 19:35 ` Alok Tiwari
2025-10-17 20:43 ` Andrew Lunn
2025-10-17 20:42 ` [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Andrew Lunn
2025-10-21 0:20 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Alok Tiwari @ 2025-10-17 19:35 UTC (permalink / raw)
To: hkallweit1, andrew, kuba, andrew+netdev, davem, edumazet, pabeni,
horms, linux, netdev, alok.a.tiwari
Cc: alok.a.tiwarilinux
Fix several spelling and grammatical errors in comments across
micrel PHY drivers. Corrections include:
- "dealy" -> "delay"
- "autonegotation" -> "autonegotiation"
- "recheas" -> "reaches"
- "one" -> "on"
- "improvenent" -> "improvement"
- "intput" -> "input"
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/phy/micrel.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 65994d97c403..5f2c7e5c314f 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1050,7 +1050,7 @@ static int ksz9021_config_init(struct phy_device *phydev)
#define TX_CLK_ID 0x1f
/* set tx and tx_clk to "No delay adjustment" to keep 0ns
- * dealy
+ * delay
*/
#define TX_ND 0x7
#define TX_CLK_ND 0xf
@@ -1913,7 +1913,7 @@ static int ksz886x_config_aneg(struct phy_device *phydev)
return ret;
if (phydev->autoneg != AUTONEG_ENABLE) {
- /* When autonegotation is disabled, we need to manually force
+ /* When autonegotiation is disabled, we need to manually force
* the link state. If we don't do this, the PHY will keep
* sending Fast Link Pulses (FLPs) which are part of the
* autonegotiation process. This is not desired when
@@ -3533,7 +3533,7 @@ static void lan8814_ptp_disable_event(struct phy_device *phydev, int event)
/* Set target to too far in the future, effectively disabling it */
lan8814_ptp_set_target(phydev, event, 0xFFFFFFFF, 0);
- /* And then reload once it recheas the target */
+ /* And then reload once it reaches the target */
lanphy_modify_page_reg(phydev, LAN8814_PAGE_COMMON_REGS, LAN8814_PTP_GENERAL_CONFIG,
LAN8814_PTP_GENERAL_CONFIG_RELOAD_ADD_X(event),
LAN8814_PTP_GENERAL_CONFIG_RELOAD_ADD_X(event));
@@ -4403,7 +4403,7 @@ static int lan8814_release_coma_mode(struct phy_device *phydev)
static void lan8814_clear_2psp_bit(struct phy_device *phydev)
{
/* It was noticed that when traffic is passing through the PHY and the
- * cable is removed then the LED was still one even though there is no
+ * cable is removed then the LED was still on even though there is no
* link
*/
lanphy_modify_page_reg(phydev, LAN8814_PAGE_PCS_DIGITAL, LAN8814_EEE_STATE,
@@ -4543,7 +4543,7 @@ static int lan8841_config_init(struct phy_device *phydev)
phy_write_mmd(phydev, KSZ9131RN_MMD_COMMON_CTRL_REG,
LAN8841_PTP_TX_VERSION, 0xff00);
- /* 100BT Clause 40 improvenent errata */
+ /* 100BT Clause 40 improvement errata */
phy_write_mmd(phydev, LAN8841_MMD_ANALOG_REG,
LAN8841_ANALOG_CONTROL_1,
LAN8841_ANALOG_CONTROL_1_PLL_TRIM(0x2));
@@ -5563,7 +5563,7 @@ static int lan8841_ptp_extts_on(struct kszphy_ptp_priv *ptp_priv, int pin,
u16 tmp = 0;
int ret;
- /* Set GPIO to be intput */
+ /* Set GPIO to be input */
ret = phy_set_bits_mmd(phydev, 2, LAN8841_GPIO_EN, BIT(pin));
if (ret)
return ret;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata()
2025-10-17 19:35 [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Alok Tiwari
2025-10-17 19:35 ` [PATCH net-next 2/2] net: phy: micrel: fix typos in comments Alok Tiwari
@ 2025-10-17 20:42 ` Andrew Lunn
2025-10-21 0:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2025-10-17 20:42 UTC (permalink / raw)
To: Alok Tiwari
Cc: hkallweit1, kuba, andrew+netdev, davem, edumazet, pabeni, horms,
linux, netdev, alok.a.tiwarilinux
On Fri, Oct 17, 2025 at 12:35:20PM -0700, Alok Tiwari wrote:
> ksz9477_phy_errata function currently assigns the return value of
> genphy_restart_aneg() to a variable and then immediately returns it
>
> err = genphy_restart_aneg(phydev);
> if (err)
> return err;
>
> return err;
>
> This can be simplified by directly returning the function call
> result, as the intermediate variable and conditional are redundant.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: micrel: fix typos in comments
2025-10-17 19:35 ` [PATCH net-next 2/2] net: phy: micrel: fix typos in comments Alok Tiwari
@ 2025-10-17 20:43 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2025-10-17 20:43 UTC (permalink / raw)
To: Alok Tiwari
Cc: hkallweit1, kuba, andrew+netdev, davem, edumazet, pabeni, horms,
linux, netdev, alok.a.tiwarilinux
On Fri, Oct 17, 2025 at 12:35:21PM -0700, Alok Tiwari wrote:
> Fix several spelling and grammatical errors in comments across
> micrel PHY drivers. Corrections include:
> - "dealy" -> "delay"
> - "autonegotation" -> "autonegotiation"
> - "recheas" -> "reaches"
> - "one" -> "on"
> - "improvenent" -> "improvement"
> - "intput" -> "input"
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata()
2025-10-17 19:35 [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Alok Tiwari
2025-10-17 19:35 ` [PATCH net-next 2/2] net: phy: micrel: fix typos in comments Alok Tiwari
2025-10-17 20:42 ` [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Andrew Lunn
@ 2025-10-21 0:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-21 0:20 UTC (permalink / raw)
To: Alok Tiwari
Cc: hkallweit1, andrew, kuba, andrew+netdev, davem, edumazet, pabeni,
horms, linux, netdev, alok.a.tiwarilinux
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 17 Oct 2025 12:35:20 -0700 you wrote:
> ksz9477_phy_errata function currently assigns the return value of
> genphy_restart_aneg() to a variable and then immediately returns it
>
> err = genphy_restart_aneg(phydev);
> if (err)
> return err;
>
> [...]
Here is the summary with links:
- [net-next,1/2] net: phy: micrel: simplify return in ksz9477_phy_errata()
https://git.kernel.org/netdev/net-next/c/3dfdc98d1dc2
- [net-next,2/2] net: phy: micrel: fix typos in comments
https://git.kernel.org/netdev/net-next/c/ba397fde5e99
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-21 0:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 19:35 [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Alok Tiwari
2025-10-17 19:35 ` [PATCH net-next 2/2] net: phy: micrel: fix typos in comments Alok Tiwari
2025-10-17 20:43 ` Andrew Lunn
2025-10-17 20:42 ` [PATCH net-next 1/2] net: phy: micrel: simplify return in ksz9477_phy_errata() Andrew Lunn
2025-10-21 0:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).