summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-07-08 15:28:06 +0200
committerVinod Koul <vkoul@kernel.org>2020-07-13 08:44:51 +0200
commitf0c47c74583cc55c7ff9bdafff63bfb33edbb940 (patch)
tree6496a24704321284772f814778049cf0da2f7b96 /drivers/phy
parentphy: mapphone-mdm6600: Add missing description for some structure fields (diff)
downloadlinux-f0c47c74583cc55c7ff9bdafff63bfb33edbb940.tar.xz
linux-f0c47c74583cc55c7ff9bdafff63bfb33edbb940.zip
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/20200708132809.265967-3-vkoul@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/phy-xgene.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/phy-xgene.c b/drivers/phy/phy-xgene.c
index 7a33ec12f71b..b88922e7de1d 100644
--- a/drivers/phy/phy-xgene.c
+++ b/drivers/phy/phy-xgene.c
@@ -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];