* [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify()
@ 2023-02-14 15:42 Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-02-14 15:42 UTC (permalink / raw)
To: Frank Sae
Cc: Peter Geis, 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 uninitialized.
Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Applies to net-next.
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..119a54d6c65d 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1534,9 +1534,9 @@ static void yt8531_link_change_notify(struct phy_device *phydev)
{
struct device_node *node = phydev->mdio.dev.of_node;
bool tx_clk_adj_enabled = false;
- bool tx_clk_1000_inverted;
- bool tx_clk_100_inverted;
- bool tx_clk_10_inverted;
+ bool tx_clk_1000_inverted = false;
+ bool tx_clk_100_inverted = false;
+ bool tx_clk_10_inverted = false;
u16 val = 0;
int ret;
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify()
@ 2023-02-14 15:48 Dan Carpenter
2023-02-14 15:50 ` Dan Carpenter
2023-02-15 1:51 ` Frank Sae
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-02-14 15:48 UTC (permalink / raw)
To: Frank Sae
Cc: Peter Geis, 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 uninitialized.
Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Applies to net-next.
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..119a54d6c65d 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1534,9 +1534,9 @@ static void yt8531_link_change_notify(struct phy_device *phydev)
{
struct device_node *node = phydev->mdio.dev.of_node;
bool tx_clk_adj_enabled = false;
- bool tx_clk_1000_inverted;
- bool tx_clk_100_inverted;
- bool tx_clk_10_inverted;
+ bool tx_clk_1000_inverted = false;
+ bool tx_clk_100_inverted = false;
+ bool tx_clk_10_inverted = false;
u16 val = 0;
int ret;
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify()
2023-02-14 15:48 [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify() Dan Carpenter
@ 2023-02-14 15:50 ` Dan Carpenter
2023-02-15 1:51 ` Frank Sae
1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-02-14 15:50 UTC (permalink / raw)
To: Frank Sae
Cc: Peter Geis, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, kernel-janitors
On Tue, Feb 14, 2023 at 06:48:31PM +0300, Dan Carpenter wrote:
> These booleans are never set to false, but are just used uninitialized.
>
> Fixes: 4ac94f728a58 ("net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> Applies to net-next.
>
Sorry for sending this twice. :/
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify()
2023-02-14 15:48 [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify() Dan Carpenter
2023-02-14 15:50 ` Dan Carpenter
@ 2023-02-15 1:51 ` Frank Sae
2023-02-15 4:22 ` Dan Carpenter
1 sibling, 1 reply; 5+ messages in thread
From: Frank Sae @ 2023-02-15 1:51 UTC (permalink / raw)
To: Dan Carpenter
Cc: Peter Geis, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, kernel-janitors
On 2023/2/14 23:48, Dan Carpenter wrote:
> @@ -1534,9 +1534,9 @@ static void yt8531_link_change_notify(struct phy_device *phydev)
> {
> struct device_node *node = phydev->mdio.dev.of_node;
> bool tx_clk_adj_enabled = false;
> - bool tx_clk_1000_inverted;
> - bool tx_clk_100_inverted;
> - bool tx_clk_10_inverted;
> + bool tx_clk_1000_inverted = false;
> + bool tx_clk_100_inverted = false;
> + bool tx_clk_10_inverted = false;
Thanks, please keep reverse christmas tree.
> u16 val = 0;
> int ret;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify()
2023-02-15 1:51 ` Frank Sae
@ 2023-02-15 4:22 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-02-15 4:22 UTC (permalink / raw)
To: Frank Sae
Cc: Peter Geis, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, kernel-janitors
On Wed, Feb 15, 2023 at 09:51:56AM +0800, Frank Sae wrote:
>
>
> On 2023/2/14 23:48, Dan Carpenter wrote:
>
> > @@ -1534,9 +1534,9 @@ static void yt8531_link_change_notify(struct phy_device *phydev)
> > {
> > struct device_node *node = phydev->mdio.dev.of_node;
> > bool tx_clk_adj_enabled = false;
> > - bool tx_clk_1000_inverted;
> > - bool tx_clk_100_inverted;
> > - bool tx_clk_10_inverted;
> > + bool tx_clk_1000_inverted = false;
> > + bool tx_clk_100_inverted = false;
> > + bool tx_clk_10_inverted = false;
>
> Thanks, please keep reverse christmas tree.
>
Right. Good point.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-15 4:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 15:48 [PATCH net-next] net: phy: Uninitialized variables in yt8531_link_change_notify() Dan Carpenter
2023-02-14 15:50 ` Dan Carpenter
2023-02-15 1:51 ` Frank Sae
2023-02-15 4:22 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2023-02-14 15:42 Dan Carpenter
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).