From: Ebru Akagunduz Date: Thu, 23 Oct 2014 13:10:16 +0000 (+0300) Subject: staging: slicoss: Use inplace convert with __be32 * X-Git-Tag: v3.19-rc1~66^2~1033 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=438c582602b9e0b421bd356f3f2cdc77fe45eb5b;p=karo-tx-linux.git 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 --- 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);