mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
phy: xgene: remove unsigned integer comparison with less than zero
We get warning with W=1 build: drivers/phy/phy-xgene.c: In function ‘xgene_phy_xlate’: drivers/phy/phy-xgene.c:1618:20: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits] 1618 | if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX) | args is uint32_t so can never be less than zero, so remove this check Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
1 parent
c988b7c5fc
commit
f0c47c7458
1 file changed
+1
-1
@@ -1615,7 +1615,7 @@ static struct phy *xgene_phy_xlate(struct device *dev,
|
||||
|
||||
if (args->args_count <= 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX)
|
||||
if (args->args[0] >= MODE_MAX)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
ctx->mode = args->args[0];
|
||||
|
||||
Reference in new issue
Block a user