DPDK patches and discussions
 help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix build with gcc 5
Date: Thu, 19 Feb 2015 14:37:08 +0200	[thread overview]
Message-ID: <54E5D8F4.9000305@redhat.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB977258213F0CA8@irsmsx105.ger.corp.intel.com>

On 02/19/2015 02:02 PM, Ananyev, Konstantin wrote:
> Hi Panu,
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Panu Matilainen
>> Sent: Thursday, February 19, 2015 10:25 AM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH] ixgbe: fix build with gcc 5
>>
>> Add extra parenthesis to remove ambiguity on what we want to compare,
>> otherwise gcc 5 issues a "logical not is only applied to the left hand
>> side of comparison" warning which with -Werror fails the build.
>>
>> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
>> ---
>>   lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c
>> index 37e5bae..93a6a00 100644
>> --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c
>> +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c
>> @@ -2898,8 +2898,8 @@ STATIC s32 ixgbe_fc_autoneg_fiber(struct ixgbe_hw *hw)
>>   	 */
>>
>>   	linkstat = IXGBE_READ_REG(hw, IXGBE_PCS1GLSTA);
>> -	if ((!!(linkstat & IXGBE_PCS1GLSTA_AN_COMPLETE) == 0) ||
>> -	    (!!(linkstat & IXGBE_PCS1GLSTA_AN_TIMED_OUT) == 1)) {
>> +	if (((!!(linkstat & IXGBE_PCS1GLSTA_AN_COMPLETE)) == 0) ||
>> +	    ((!!(linkstat & IXGBE_PCS1GLSTA_AN_TIMED_OUT)) == 1)) {
>>   		ERROR_REPORT1(IXGBE_ERROR_POLLING,
>>   			     "Auto-Negotiation did not complete or timed out");
>>   		goto out;
>
> Unfortunately we are not supposed to change files under ixgbe subfirectory (except ixgbe_osdep.*).

Oh, sorry about that, I didn't realize there were untouchable files in 
the repo. Its not a very common setup :)

> Usually we deal with it just by:
> If GCC_VERSION...
> CFLAGS_ixgbe_common.o += -Wno...
>
> You can have a look at lib/librte_pmd_ixgbe/Makefile, there are plenty of such things.

Yup, noticed that but assumed the warning disablers were mainly for 
things that are not trivial to fix.

This one can be worked around just as easily with 
-Wlogical-not-parentheses, but since this flag is new to gcc 5 it can't 
really be added until gcc 5 is recognized as a supported version by the 
makefiles:
http://dpdk.org/dev/patchwork/patch/3452/

I'll send an updated version using warning disabler once other gcc-5 
support goes in.

	- Panu -

  reply	other threads:[~2015-02-19 12:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 10:25 Panu Matilainen
2015-02-19 10:25 ` [dpdk-dev] [PATCH] i40e: " Panu Matilainen
2015-02-19 11:05   ` Ananyev, Konstantin
2015-02-19 11:09     ` Panu Matilainen
2015-02-19 11:21   ` [dpdk-dev] [PATCH v2] " Panu Matilainen
2015-02-19 11:41     ` Ananyev, Konstantin
2015-02-20 14:11       ` Thomas Monjalon
2015-02-19 12:02 ` [dpdk-dev] [PATCH] ixgbe: " Ananyev, Konstantin
2015-02-19 12:37   ` Panu Matilainen [this message]
2015-02-19 13:07   ` Neil Horman
2015-02-24 13:13 ` [dpdk-dev] [PATCH v2] " Panu Matilainen
2015-02-24 13:45   ` Ananyev, Konstantin
2015-02-25 15:26     ` Thomas Monjalon

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=54E5D8F4.9000305@redhat.com \
    --to=pmatilai@redhat.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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).