Message ID | 20170724172523.13135-2-sthemmin@microsoft.com |
---|---|
State | Awaiting Upstream |
Delegated to: | Pablo Neira |
Headers | show |
On Mon, Jul 24, 2017 at 10:25 AM, Stephen Hemminger <stephen@networkplumber.org> wrote: > 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> -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index be6acadcb202..96b8c0db10f9 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -520,7 +520,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++) {
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> --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)