netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot
@ 2021-10-11  2:27 Wan Jiabing
  2021-10-11 13:44 ` Vladimir Oltean
  2021-10-12 10:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Wan Jiabing @ 2021-10-11  2:27 UTC (permalink / raw)
  To: Vladimir Oltean, Claudiu Manoil, Alexandre Belloni,
	UNGLinuxDriver, David S. Miller, Jakub Kicinski, Russell King,
	netdev, linux-kernel
  Cc: kael_w, Wan Jiabing

Fix the following coccicheck warning:
drivers/net/ethernet/mscc/ocelot.c:474:duplicated argument to & or |
drivers/net/ethernet/mscc/ocelot.c:476:duplicated argument to & or |
drivers/net/ethernet/mscc/ocelot_net.c:1627:duplicated argument 
to & or |

These DEV_CLOCK_CFG_MAC_TX_RST are duplicate here.
Here should be DEV_CLOCK_CFG_MAC_RX_RST.

Fixes: e6e12df625f2 ("net: mscc: ocelot: convert to phylink")
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/net/ethernet/mscc/ocelot.c     | 4 ++--
 drivers/net/ethernet/mscc/ocelot_net.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 559177e6ded4..4de58321907c 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -472,9 +472,9 @@ void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
 	    !(quirks & OCELOT_QUIRK_QSGMII_PORTS_MUST_BE_UP))
 		ocelot_port_rmwl(ocelot_port,
 				 DEV_CLOCK_CFG_MAC_TX_RST |
-				 DEV_CLOCK_CFG_MAC_TX_RST,
+				 DEV_CLOCK_CFG_MAC_RX_RST,
 				 DEV_CLOCK_CFG_MAC_TX_RST |
-				 DEV_CLOCK_CFG_MAC_TX_RST,
+				 DEV_CLOCK_CFG_MAC_RX_RST,
 				 DEV_CLOCK_CFG);
 }
 EXPORT_SYMBOL_GPL(ocelot_phylink_mac_link_down);
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
index e54b9fb2a97a..2a85bcb5d0c2 100644
--- a/drivers/net/ethernet/mscc/ocelot_net.c
+++ b/drivers/net/ethernet/mscc/ocelot_net.c
@@ -1625,7 +1625,7 @@ static int ocelot_port_phylink_create(struct ocelot *ocelot, int port,
 	if (phy_mode == PHY_INTERFACE_MODE_QSGMII)
 		ocelot_port_rmwl(ocelot_port, 0,
 				 DEV_CLOCK_CFG_MAC_TX_RST |
-				 DEV_CLOCK_CFG_MAC_TX_RST,
+				 DEV_CLOCK_CFG_MAC_RX_RST,
 				 DEV_CLOCK_CFG);
 
 	ocelot_port->phy_mode = phy_mode;
-- 
2.30.2


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

* Re: [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot
  2021-10-11  2:27 [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot Wan Jiabing
@ 2021-10-11 13:44 ` Vladimir Oltean
  2021-10-12 10:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2021-10-11 13:44 UTC (permalink / raw)
  To: Wan Jiabing
  Cc: Claudiu Manoil, Alexandre Belloni, UNGLinuxDriver@microchip.com,
	David S. Miller, Jakub Kicinski, Russell King,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kael_w@yeah.net

On Mon, Oct 11, 2021 at 10:27:41AM +0800, Wan Jiabing wrote:
> Fix the following coccicheck warning:
> drivers/net/ethernet/mscc/ocelot.c:474:duplicated argument to & or |
> drivers/net/ethernet/mscc/ocelot.c:476:duplicated argument to & or |
> drivers/net/ethernet/mscc/ocelot_net.c:1627:duplicated argument 
> to & or |
> 
> These DEV_CLOCK_CFG_MAC_TX_RST are duplicate here.
> Here should be DEV_CLOCK_CFG_MAC_RX_RST.
> 
> Fixes: e6e12df625f2 ("net: mscc: ocelot: convert to phylink")
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

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

* Re: [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot
  2021-10-11  2:27 [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot Wan Jiabing
  2021-10-11 13:44 ` Vladimir Oltean
@ 2021-10-12 10:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-12 10:30 UTC (permalink / raw)
  To: Wan Jiabing
  Cc: vladimir.oltean, claudiu.manoil, alexandre.belloni,
	UNGLinuxDriver, davem, kuba, linux, netdev, linux-kernel, kael_w

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 11 Oct 2021 10:27:41 +0800 you wrote:
> Fix the following coccicheck warning:
> drivers/net/ethernet/mscc/ocelot.c:474:duplicated argument to & or |
> drivers/net/ethernet/mscc/ocelot.c:476:duplicated argument to & or |
> drivers/net/ethernet/mscc/ocelot_net.c:1627:duplicated argument
> to & or |
> 
> These DEV_CLOCK_CFG_MAC_TX_RST are duplicate here.
> Here should be DEV_CLOCK_CFG_MAC_RX_RST.
> 
> [...]

Here is the summary with links:
  - net: mscc: ocelot: Fix dumplicated argument in ocelot
    https://git.kernel.org/netdev/net/c/74a3bc42fe51

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:[~2021-10-12 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11  2:27 [PATCH] net: mscc: ocelot: Fix dumplicated argument in ocelot Wan Jiabing
2021-10-11 13:44 ` Vladimir Oltean
2021-10-12 10: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).