diff mbox series

net: mscc: ocelot: Fix dumplicated argument in ocelot

Message ID 20211011022742.3211-1-wanjiabing@vivo.com (mailing list archive)
State Accepted
Commit 74a3bc42fe514098030a78c1ad5e6024463dd378
Delegated to: Netdev Maintainers
Headers show
Series net: mscc: ocelot: Fix dumplicated argument in ocelot | expand

Checks

Context Check Description
netdev/cover_letter success Single patches do not need cover letters
netdev/fixes_present success Fixes tag not required for -next series
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Fixes tag looks correct
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success No static functions without inline keyword in header files

Commit Message

Jiabing Wan Oct. 11, 2021, 2:27 a.m. UTC
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(-)

Comments

Vladimir Oltean Oct. 11, 2021, 1:44 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org Oct. 12, 2021, 10:30 a.m. UTC | #2
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
diff mbox series

Patch

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;