diff mbox series

[5/5] net/ixgbe: fix compilation on ARM BE

Message ID 1509617335-6354-5-git-send-email-hemant.agrawal@nxp.com
State Superseded
Headers show
Series [1/5] pmdinfogen: fix cross compilation for ARM BE | expand

Commit Message

Hemant Agrawal Nov. 2, 2017, 10:08 a.m. UTC
fixes the following compilation error on compiling with ARM BE compiler

ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
ixgbe_common.c:4610:22: error: passing argument 1 of
‘__builtin_bswap32’ makes integer from pointer without a cast
[-Werror=int-conversion]
   IXGBE_LE32_TO_CPUS(&buffer[bi]);
                      ^
Fixes: aa4fc14d2cee ("ixgbe: update base driver")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Bruce Richardson Dec. 11, 2017, 12:42 p.m. UTC | #1
On Thu, Nov 02, 2017 at 03:38:55PM +0530, Hemant Agrawal wrote:
> fixes the following compilation error on compiling with ARM BE compiler

> 

> ixgbe_common.c: In function ‘ixgbe_host_interface_command’:

> ixgbe_common.c:4610:22: error: passing argument 1 of

> ‘__builtin_bswap32’ makes integer from pointer without a cast

> [-Werror=int-conversion]

>    IXGBE_LE32_TO_CPUS(&buffer[bi]);

>                       ^

> Fixes: aa4fc14d2cee ("ixgbe: update base driver")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Looks harmless!

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 7f85713..5e6ad95 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4607,7 +4607,7 @@  s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* first pull in the header so we know the buffer length */
 	for (bi = 0; bi < dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS(&buffer[bi]);
+		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
 	}
 
 	/* If there is any thing in data position pull it in */
@@ -4627,7 +4627,7 @@  s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* Pull in the rest of the buffer (bi is where we left off) */
 	for (; bi <= dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS(&buffer[bi]);
+		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
 	}
 
 rel_out: