Skip to content

Commit

Permalink
net: phy: mscc: fix excluded_middle.cocci warnings
Browse files Browse the repository at this point in the history
Condition !A || A && B is equivalent to !A || B.

Generated by: scripts/coccinelle/misc/excluded_middle.cocci

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2011161633240.2682@hadrien
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kernel test robot authored and Jakub Kicinski committed Nov 17, 2020
1 parent f85cd06 commit b618c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/mscc/mscc_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static void vsc85xx_ts_write_csr(struct phy_device *phydev, enum ts_blk blk,

phy_ts_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_1588);

if (!cond || (cond && upper))
if (!cond || upper)
phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_MSB, upper);

phy_ts_base_write(phydev, MSCC_PHY_TS_CSR_DATA_LSB, lower);
Expand Down

0 comments on commit b618c32

Please sign in to comment.