浏览代码

bnxt: fix unsigned comparsion with 0

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>
stephen hemminger 8 年之前
父节点
当前提交
b721cfaf03
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

+ 1 - 1
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

@@ -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++) {