bnxt: fix unsigned comparsion with 0
authorstephen hemminger <[email protected]>
Mon, 24 Jul 2017 17:25:18 +0000 (10:25 -0700)
committerDavid S. Miller <[email protected]>
Tue, 25 Jul 2017 19:31:37 +0000 (12:31 -0700)
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 <[email protected]>
Acked-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index 140e76904af92e12454bdb21bf96146bbb156c73..08b870d7d4669d92c6957097afce56257f27f336 100644 (file)
@@ -523,7 +523,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++) {