* [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()
@ 2023-02-15 4:21 Dan Carpenter
2023-02-15 5:19 ` Frank Sae
2023-02-16 5:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-02-15 4:21 UTC (permalink / raw)
To: Frank Sae
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev,
kernel-janitors
These booleans are never set to false, but are just used without being
initialized.
Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
v2: reverse Christmas tree. Also add "motorcomm" to the subject. It
really feels like previous patches to this driver should have had
motorcomm in the subject as well. It's a common anti-pattern to only
put the subsystem name and not the driver name when adding a new file.
drivers/net/phy/motorcomm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
index ee7c37dfdca0..2fa5a90e073b 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy_device *phydev)
static void yt8531_link_change_notify(struct phy_device *phydev)
{
struct device_node *node = phydev->mdio.dev.of_node;
+ bool tx_clk_1000_inverted = false;
+ bool tx_clk_100_inverted = false;
+ bool tx_clk_10_inverted = false;
bool tx_clk_adj_enabled = false;
- bool tx_clk_1000_inverted;
- bool tx_clk_100_inverted;
- bool tx_clk_10_inverted;
u16 val = 0;
int ret;
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()
2023-02-15 4:21 [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() Dan Carpenter
@ 2023-02-15 5:19 ` Frank Sae
2023-02-16 5:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Frank Sae @ 2023-02-15 5:19 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev,
kernel-janitors, Peter Geis, yanhong.wang, xiaogang.fan,
fei.zhang, hua.sun
On 2023/2/15 12:21, Dan Carpenter wrote:
> These booleans are never set to false, but are just used without being
> initialized.
>
> Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> v2: reverse Christmas tree. Also add "motorcomm" to the subject. It
> really feels like previous patches to this driver should have had
> motorcomm in the subject as well. It's a common anti-pattern to only
> put the subsystem name and not the driver name when adding a new file.
>
> drivers/net/phy/motorcomm.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> index ee7c37dfdca0..2fa5a90e073b 100644
> --- a/drivers/net/phy/motorcomm.c
> +++ b/drivers/net/phy/motorcomm.c
> @@ -1533,10 +1533,10 @@ static int yt8531_config_init(struct phy_device *phydev)
> static void yt8531_link_change_notify(struct phy_device *phydev)
> {
> struct device_node *node = phydev->mdio.dev.of_node;
> + bool tx_clk_1000_inverted = false;
> + bool tx_clk_100_inverted = false;
> + bool tx_clk_10_inverted = false;
> bool tx_clk_adj_enabled = false;
> - bool tx_clk_1000_inverted;
> - bool tx_clk_100_inverted;
> - bool tx_clk_10_inverted;
> u16 val = 0;
> int ret;
>
Reviewed-by: Frank Sae <Frank.Sae@motor-comm.com>
Add cc.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()
2023-02-15 4:21 [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() Dan Carpenter
2023-02-15 5:19 ` Frank Sae
@ 2023-02-16 5:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-16 5:30 UTC (permalink / raw)
To: Dan Carpenter
Cc: Frank.Sae, andrew, hkallweit1, linux, davem, edumazet, kuba,
pabeni, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 15 Feb 2023 07:21:47 +0300 you wrote:
> These booleans are never set to false, but are just used without being
> initialized.
>
> Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> v2: reverse Christmas tree. Also add "motorcomm" to the subject. It
> really feels like previous patches to this driver should have had
> motorcomm in the subject as well. It's a common anti-pattern to only
> put the subsystem name and not the driver name when adding a new file.
>
> [...]
Here is the summary with links:
- [v2,net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify()
https://git.kernel.org/netdev/net-next/c/9753613f7399
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] 3+ messages in thread
end of thread, other threads:[~2023-02-16 5:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 4:21 [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables in yt8531_link_change_notify() Dan Carpenter
2023-02-15 5:19 ` Frank Sae
2023-02-16 5:30 ` 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).