linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct
@ 2019-08-05 18:55 Tao Ren
  2019-08-06 21:11 ` Andrew Lunn
  2019-08-13 19:54 ` Florian Fainelli
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Ren @ 2019-08-05 18:55 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit, David S . Miller,
	Vladimir Oltean, Arun Parameswaran, Justin Chen, netdev,
	linux-kernel, openbmc
  Cc: Tao Ren

Modify the assignment to OR when dealing with phydev->dev_flags in
phy_attach_direct function, and this is to make sure dev_flags set in
driver's probe callback won't be lost.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
CC: Heiner Kallweit <hkallweit1@gmail.com>
CC: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Tao Ren <taoren@fb.com>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 6b5cb87f3866..9259eb45c794 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1270,7 +1270,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
 			phydev_err(phydev, "error creating 'phy_standalone' sysfs entry\n");
 	}
 
-	phydev->dev_flags = flags;
+	phydev->dev_flags |= flags;
 
 	phydev->interface = interface;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct
  2019-08-05 18:55 [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct Tao Ren
@ 2019-08-06 21:11 ` Andrew Lunn
  2019-08-13 19:54 ` Florian Fainelli
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-08-06 21:11 UTC (permalink / raw)
  To: Tao Ren
  Cc: Florian Fainelli, Heiner Kallweit, David S . Miller,
	Vladimir Oltean, Arun Parameswaran, Justin Chen, netdev,
	linux-kernel, openbmc

On Mon, Aug 05, 2019 at 11:55:51AM -0700, Tao Ren wrote:
> Modify the assignment to OR when dealing with phydev->dev_flags in
> phy_attach_direct function, and this is to make sure dev_flags set in
> driver's probe callback won't be lost.
> 
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
> CC: Heiner Kallweit <hkallweit1@gmail.com>
> CC: Vladimir Oltean <olteanv@gmail.com>
> Signed-off-by: Tao Ren <taoren@fb.com>

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

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct
  2019-08-05 18:55 [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct Tao Ren
  2019-08-06 21:11 ` Andrew Lunn
@ 2019-08-13 19:54 ` Florian Fainelli
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2019-08-13 19:54 UTC (permalink / raw)
  To: Tao Ren, Andrew Lunn, Heiner Kallweit, David S . Miller,
	Vladimir Oltean, Arun Parameswaran, Justin Chen, netdev,
	linux-kernel, openbmc

On 8/5/19 11:55 AM, Tao Ren wrote:
> Modify the assignment to OR when dealing with phydev->dev_flags in
> phy_attach_direct function, and this is to make sure dev_flags set in
> driver's probe callback won't be lost.

As Andrew pointed out already, this probably needs to be reworked, but
for now this looks reasonable:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-13 19:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 18:55 [PATCH net-next] net: phy: modify assignment to OR for dev_flags in phy_attach_direct Tao Ren
2019-08-06 21:11 ` Andrew Lunn
2019-08-13 19:54 ` Florian Fainelli

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).