From: stephen hemminger Date: Mon, 24 Jul 2017 17:25:18 +0000 (-0700) Subject: bnxt: fix unsigned comparsion with 0 X-Git-Tag: v4.1.12-124.31.3~965 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4abad4799e4cde325355855a6f89e94c36643d2a;p=users%2Fjedix%2Flinux-maple.git bnxt: fix unsigned comparsion with 0 Orabug: 27648355, 27648339 Fixes warning because location is u32 and can never be netative warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Stephen Hemminger Acked-by: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit b721cfaf03bcaac0a3abf702c4240326eed9e4b1) Signed-off-by: Brian Maly Reviewed-by: Jack Vogel --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 16c451c2c126..538d70b1adf1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -524,7 +524,7 @@ static int bnxt_grxclsrule(struct bnxt *bp, struct ethtool_rxnfc *cmd) struct flow_keys *fkeys; int i, rc = -EINVAL; - if (fs->location < 0 || fs->location >= BNXT_NTP_FLTR_MAX_FLTR) + if (fs->location >= BNXT_NTP_FLTR_MAX_FLTR) return rc; for (i = 0; i < BNXT_NTP_FLTR_HASH_SIZE; i++) {