* [patch -next] bnxt: fix a condition
@ 2016-07-07 8:23 Dan Carpenter
2016-07-07 8:31 ` Michael Chan
2016-07-09 4:02 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-07-07 8:23 UTC (permalink / raw)
To: David S. Miller, Michael Chan
Cc: Jeffrey Huang, Alexander Duyck, netdev, kernel-janitors
This code generates as static checker warning because htons(ETH_P_IPV6)
is always true. From the context it looks like the && was intended to
be !=.
Fixes: 94758f8de037 ('bnxt_en: Add GRO logic for BCM5731X chips.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 70b148a..659faa6 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -997,7 +997,7 @@ static struct sk_buff *bnxt_gro_func_5731x(struct bnxt_tpa_info *tpa_info,
* correct protocol ID, it must be a loopback packet where
* the offsets are off by 4.
*/
- if (proto != htons(ETH_P_IP) && proto && htons(ETH_P_IPV6))
+ if (proto != htons(ETH_P_IP) && proto != htons(ETH_P_IPV6))
loopback = true;
}
if (loopback) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch -next] bnxt: fix a condition
2016-07-07 8:23 [patch -next] bnxt: fix a condition Dan Carpenter
@ 2016-07-07 8:31 ` Michael Chan
2016-07-09 4:02 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2016-07-07 8:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: David S. Miller, Jeffrey Huang, Alexander Duyck, Netdev,
kernel-janitors
On Thu, Jul 7, 2016 at 1:23 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> This code generates as static checker warning because htons(ETH_P_IPV6)
> is always true. From the context it looks like the && was intended to
> be !=.
>
> Fixes: 94758f8de037 ('bnxt_en: Add GRO logic for BCM5731X chips.')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks. The fix is correct.
Acked-by: Michael Chan <michael.chan@broadcom.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch -next] bnxt: fix a condition
2016-07-07 8:23 [patch -next] bnxt: fix a condition Dan Carpenter
2016-07-07 8:31 ` Michael Chan
@ 2016-07-09 4:02 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-07-09 4:02 UTC (permalink / raw)
To: dan.carpenter; +Cc: michael.chan, huangjw, aduyck, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 7 Jul 2016 11:23:09 +0300
> This code generates as static checker warning because htons(ETH_P_IPV6)
> is always true. From the context it looks like the && was intended to
> be !=.
>
> Fixes: 94758f8de037 ('bnxt_en: Add GRO logic for BCM5731X chips.')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-09 4:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 8:23 [patch -next] bnxt: fix a condition Dan Carpenter
2016-07-07 8:31 ` Michael Chan
2016-07-09 4:02 ` David Miller
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).