[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211224091208.32274-1-yang.lee@linux.alibaba.com>
Date: Fri, 24 Dec 2021 17:12:08 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: davem@...emloft.net
Cc: kuba@...nel.org, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next] net: phy: micrel: use min() macro instead of doing it manually
Fix following coccicheck warning:
./drivers/net/phy/micrel.c:1482:12-13: WARNING opportunity for min()
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/net/phy/micrel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c6a97fcca0e6..dda426596445 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1479,7 +1479,7 @@ static int ksz886x_cable_test_wait_for_completion(struct phy_device *phydev)
!(val & KSZ8081_LMD_ENABLE_TEST),
30000, 100000, true);
- return ret < 0 ? ret : 0;
+ return min(ret, 0);
}
static int ksz886x_cable_test_one_pair(struct phy_device *phydev, int pair)
--
2.20.1.7.g153144c
Powered by blists - more mailing lists