diff mbox

i40evf: fix 32 bit build warnings

Message ID 6607276.TY67sbLLqL@wuerfel
State Not Applicable
Headers show

Commit Message

Arnd Bergmann Oct. 7, 2015, 8:13 p.m. UTC
Jesse Brandeburg fixed a bug for 32-bit systems in the i40e driver
in commit 9c70d7cebfec5 ("i40e: fix 32 bit build warnings"), but the
same code still exists in the i40evf driver and causes compilation
warnings in ARM and x86 allmodconfig:

drivers/net/ethernet/intel/i40evf/i40e_common.c:445:68: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/net/ethernet/intel/i40evf/i40e_common.c:446:71: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

This applies the same fix by removing the broken code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---

It would probably be a good idea to merge some of the duplicate code into
a library module that gets used by both drivers to avoid having to fix bugs
twice in the future.

Comments

Jesse Brandeburg Oct. 9, 2015, 10:31 p.m. UTC | #1
On Wed, 7 Oct 2015 22:13:19 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> Jesse Brandeburg fixed a bug for 32-bit systems in the i40e driver
> in commit 9c70d7cebfec5 ("i40e: fix 32 bit build warnings"), but the
> same code still exists in the i40evf driver and causes compilation
> warnings in ARM and x86 allmodconfig:
> 
> drivers/net/ethernet/intel/i40evf/i40e_common.c:445:68: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/net/ethernet/intel/i40evf/i40e_common.c:446:71: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 
> This applies the same fix by removing the broken code.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for catching that, my mistake.
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

> It would probably be a good idea to merge some of the duplicate code into
> a library module that gets used by both drivers to avoid having to fix bugs
> twice in the future.

The library is a nice idea, but while much of the code is the same,
many things about interaction with it while running in the VF context
are different than when called in the PF context.

We will look closely at what we can commonize and at least move to
header files.

Thanks!
Kirsher, Jeffrey T Oct. 13, 2015, 6:18 a.m. UTC | #2
On Wed, 2015-10-07 at 22:13 +0200, Arnd Bergmann wrote:
> Jesse Brandeburg fixed a bug for 32-bit systems in the i40e driver
> in commit 9c70d7cebfec5 ("i40e: fix 32 bit build warnings"), but the
> same code still exists in the i40evf driver and causes compilation
> warnings in ARM and x86 allmodconfig:
> 
> drivers/net/ethernet/intel/i40evf/i40e_common.c:445:68: warning: cast
> from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/net/ethernet/intel/i40evf/i40e_common.c:446:71: warning: cast
> from pointer to integer of different size [-Wpointer-to-int-cast]
> 
> This applies the same fix by removing the broken code.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Does not apply at all to my next-queue tree (dev-queue branch), my
guess is that this is already fixed in one of the patches already in my
queue.
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index 1950db10a414..92e180d9b86e 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -442,9 +442,6 @@  static i40e_status i40e_aq_get_set_rss_lut(struct i40e_hw *hw,
 					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) &
 					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK));
 
-	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)lut));
-	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)lut));
-
 	status = i40evf_asq_send_command(hw, &desc, lut, lut_size, NULL);
 
 	return status;
@@ -519,8 +516,6 @@  static i40e_status i40e_aq_get_set_rss_key(struct i40e_hw *hw,
 					  I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) &
 					  I40E_AQC_SET_RSS_KEY_VSI_ID_MASK));
 	cmd_resp->vsi_id |= cpu_to_le16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID);
-	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)key));
-	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)key));
 
 	status = i40evf_asq_send_command(hw, &desc, key, key_size, NULL);