From: Stephen Hemminger <stephen@networkplumber.org>
To: marcel@holtmann.org, gustavo@padovan.org,
johan.hedberg@gmail.com, davem@davemloft.net,
pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de
Cc: netdev@vger.kernel.org, linux-bluetooth@vger.kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
Stephen Hemminger <sthemmin@microsoft.com>
Subject: [PATCH net-next 1/6] bnxt: fix unsigned comparsion with 0
Date: Mon, 24 Jul 2017 10:25:18 -0700 [thread overview]
Message-ID: <20170724172523.13135-2-sthemmin@microsoft.com> (raw)
In-Reply-To: <20170724172523.13135-1-sthemmin@microsoft.com>
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(-)
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++) {
--
2.11.0
next prev parent reply other threads:[~2017-07-24 17:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 17:25 [PATCH net-next 0/6] network related warning fixes Stephen Hemminger
2017-07-24 17:25 ` Stephen Hemminger [this message]
2017-07-24 17:48 ` [PATCH net-next 1/6] bnxt: fix unsigned comparsion with 0 Michael Chan
2017-07-24 17:25 ` [PATCH net-next 2/6] bnxt: fix unused variable warnings Stephen Hemminger
2017-07-24 17:50 ` Michael Chan
2017-07-24 17:25 ` [PATCH net-next 3/6] benet: fix set but not used warning Stephen Hemminger
2017-07-24 17:25 ` [PATCH net-next 4/6] netfilter: remove unused variable Stephen Hemminger
2017-07-24 17:25 ` [PATCH net-next 5/6] socket: fix set not used warning Stephen Hemminger
2017-07-24 17:25 ` [PATCH net-next 6/6] 6lowpan: " Stephen Hemminger
2017-07-25 12:45 ` Luiz Augusto von Dentz
2017-07-25 19:31 ` [PATCH net-next 0/6] network related warning fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170724172523.13135-2-sthemmin@microsoft.com \
--to=stephen@networkplumber.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=sthemmin@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).