[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c84995c-5546-47aa-d4ed-1db8cc7053c3@motor-comm.com>
Date: Wed, 15 Feb 2023 13:19:28 +0800
From: Frank Sae <Frank.Sae@...or-comm.com>
To: Dan Carpenter <error27@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org, Peter Geis <pgwipeout@...il.com>,
yanhong.wang@...rfivetech.com, xiaogang.fan@...or-comm.com,
fei.zhang@...or-comm.com, hua.sun@...or-comm.com
Subject: Re: [PATCH v2 net-next] net: phy: motorcomm: uninitialized variables
in yt8531_link_change_notify()
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@...il.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@...or-comm.com>
Add cc.
Powered by blists - more mailing lists