From 438c582602b9e0b421bd356f3f2cdc77fe45eb5b Mon Sep 17 00:00:00 2001 From: Ebru Akagunduz Date: Thu, 23 Oct 2014 16:10:16 +0300 Subject: [PATCH] staging: slicoss: Use inplace convert with __be32 * This patch fixes "cast to restricted __be32" sparse warning. remove temporary value assignment and use inplace __be32 conversion for ntohl function which is can get big endian format Signed-off-by: Ebru Akagunduz Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/slicoss/slicoss.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index f48eeb168e0b..71bc4edae322 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -596,8 +596,7 @@ static void slic_mac_address_config(struct adapter *adapter) u32 value2; __iomem struct slic_regs *slic_regs = adapter->slic_regs; - value = *(u32 *) &adapter->currmacaddr[2]; - value = ntohl(value); + value = ntohl(*(__be32 *) &adapter->currmacaddr[2]); slic_reg32_write(&slic_regs->slic_wraddral, value, FLUSH); slic_reg32_write(&slic_regs->slic_wraddrbl, value, FLUSH); -- 2.30.2