From: Ebru Akagunduz Date: Thu, 23 Oct 2014 13:10:16 +0000 (+0300) Subject: staging: slicoss: Use inplace convert with __be32 * X-Git-Tag: v5.15~16669^2~1033 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=438c582602b9e0b421bd356f3f2cdc77fe45eb5b;p=platform%2Fkernel%2Flinux-starfive.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 f48eeb1..71bc4ed 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);