Skip to contentSkip to conversation

i40e: Fix compilation issue with DPDK

PATCH New Alice Michael 2 participants 2 messages Dec 27, 2017 – Jan 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 9/13 i40e: Fix compilation issue with DPDK

From: Jeff Kirsher <[email protected]>

When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart enough to see that when you have an integrated VF that just one of the if statemets has to be true so that ntu is always set. Fix the way that the code is for integrated VFs so that the compiler won't complain.

---
 drivers/net/ethernet/intel/i40e/i40e_adminq.c   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq.c +1 -1
index c4fa06d..e789716 100644
@@ -976,7 +976,7 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
 	}
 
 	/* set next_to_use to head */
-	ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);
+	ntu = rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK;
 	if (ntu == ntc) {
 		/* nothing to do - shouldn't need to update ring's values */
 		ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK;
drivers/net/ethernet/intel/i40evf/i40e_adminq.c +1 -1
index ae3a740..d1aab6b 100644
@@ -906,7 +906,7 @@ i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,
 	}
 
 	/* set next_to_use to head */
-	ntu = (rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK);
+	ntu = rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK;
 	if (ntu == ntc) {
 		/* nothing to do - shouldn't need to update ring's values */
 		ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK;
Signature · 1 line
2.9.5
#1 lore raw

PATCH 9/13 i40e: Fix compilation issue with DPDK

Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, December 27, 2017 5:21 AM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S84-V2 09/13] i40e: Fix compilation issue with DPDK

From: Jeff Kirsher <[email protected]>

When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart enough to see that when you have an integrated VF that just one of the if statemets has to be true so that ntu is always set. Fix the way that the code is for integrated VFs so that the compiler won't complain.

Quoted 5 lines
---
 drivers/net/ethernet/intel/i40e/i40e_adminq.c   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)