From: Igor Pylypiv <ipylypiv@silver-peak.com>
To: David Miller <davem@davemloft.net>
Cc: lkp@intel.com, kbuild-all@01.org, skhare@vmware.com,
pv-drivers@vmware.com, netdev@vger.kernel.org
Subject: Re: [PATCH] vmxnet3: fix LRO feature check
Date: Tue, 20 Mar 2018 11:24:32 -0700 [thread overview]
Message-ID: <20180320182430.GA65@silver-peak.com> (raw)
In-Reply-To: <20180320.105722.15146213885137044.davem@davemloft.net>
The 03/20/2018 10:57, David Miller wrote:
> From: kbuild test robot <lkp@intel.com>
> Date: Sun, 18 Mar 2018 14:37:35 +0800
>
> > All warnings (new ones prefixed by >>):
> >
> > drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_rq_rx_complete':
> >>> drivers/net/vmxnet3/vmxnet3_drv.c:1474:8: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
> > !adapter->netdev->features & NETIF_F_LRO) {
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Igor, I will fix this up for you. But it is clear that this patch wasn't tested
> very well.
>
> Because !adapter->netdev->features evaluates wholly before the "& NETIF_F_LRO",
> the flags aren't being tested properly at all.
My bad.
I have even been looking at C operator precedence table:
----------------------------
| Operator | Associativity |
|--------------------------|
| ++ -- | right-to-left |
| + - | |
| ! ~ | |
| (type) | |
| * | |
| & | |
| sizeof | |
----------------------------
According to this table '&' will be evaluated first, because it is on the right side.
But yeah, that was "Address of", not "Bitwise AND".
next prev parent reply other threads:[~2018-03-20 18:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 7:58 [PATCH] vmxnet3: fix LRO feature check Igor Pylypiv
2018-03-18 0:20 ` David Miller
2018-03-18 1:08 ` Igor Pylypiv
2018-03-18 6:37 ` kbuild test robot
2018-03-20 14:57 ` David Miller
2018-03-20 18:24 ` Igor Pylypiv [this message]
2018-03-20 18:42 ` Shrikrishna Khare
2018-03-20 18:59 ` David Miller
2018-03-18 11:23 ` kbuild test robot
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=20180320182430.GA65@silver-peak.com \
--to=ipylypiv@silver-peak.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=skhare@vmware.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.