]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt: fix unsigned comparsion with 0
authorstephen hemminger <stephen@networkplumber.org>
Mon, 24 Jul 2017 17:25:18 +0000 (10:25 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 9 Mar 2018 04:47:32 +0000 (20:47 -0800)
Orabug: 2764835527648339

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 <sthemmin@microsoft.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b721cfaf03bcaac0a3abf702c4240326eed9e4b1)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index 16c451c2c1266282765dda58cd72f30b2a4afd86..538d70b1adf10f1989911fa7d1d12369591e8fde 100644 (file)
@@ -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++) {