From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pmatilai@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id D0B05B50F
 for <dev@dpdk.org>; Thu, 19 Feb 2015 12:21:14 +0100 (CET)
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1JBLDRr022615
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL)
 for <dev@dpdk.org>; Thu, 19 Feb 2015 06:21:13 -0500
Received: from localhost.localdomain.com (vpn1-6-118.ams2.redhat.com
 [10.36.6.118])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t1JBLCqr010495 for <dev@dpdk.org>; Thu, 19 Feb 2015 06:21:13 -0500
From: Panu Matilainen <pmatilai@redhat.com>
To: dev@dpdk.org
Date: Thu, 19 Feb 2015 13:21:10 +0200
Message-Id: <581bc65f3701e08b035e4d08fbd2831e03c030d8.1424344715.git.pmatilai@redhat.com>
In-Reply-To: <442c1d71592455d2f3c8df4cc944cc48c1092fc6.1424341431.git.pmatilai@redhat.com>
References: <442c1d71592455d2f3c8df4cc944cc48c1092fc6.1424341431.git.pmatilai@redhat.com>
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Subject: [dpdk-dev] [PATCH v2] i40e: fix build with gcc 5
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Feb 2015 11:21:15 -0000

Eliminate ambiguity in the condition which trips up a "logical not
is only applied to the left..." warning from gcc 5, causing build
failure with -Werror. Besides non-ambiguous, the condition is
far more obvious this way.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pmd_i40e/i40e_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index c9f1026..12c0831 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -613,7 +613,7 @@ check_rx_burst_bulk_alloc_preconditions(__rte_unused struct i40e_rx_queue *rxq)
 			     "rxq->nb_rx_desc=%d",
 			     rxq->rx_free_thresh, rxq->nb_rx_desc);
 		ret = -EINVAL;
-	} else if (!(rxq->nb_rx_desc % rxq->rx_free_thresh) == 0) {
+	} else if (rxq->nb_rx_desc % rxq->rx_free_thresh != 0) {
 		PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: "
 			     "rxq->nb_rx_desc=%d, "
 			     "rxq->rx_free_thresh=%d",
-- 
2.1.0