staging: slicoss: Use inplace convert with __be32 *
authorEbru Akagunduz <ebru.akagunduz@gmail.com>
Thu, 23 Oct 2014 13:10:16 +0000 (16:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:05 +0000 (10:33 +0800)
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 <ebru.akagunduz@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index f48eeb168e0b2fe965ed459898985f6006ad9857..71bc4edae322c4bd644b9b6e944271bf272b0cac 100644 (file)
@@ -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);