drivers: net: silence compiler warning in smc91x.c
authorPankaj Dubey <pankaj.dubey@samsung.com>
Fri, 10 Jan 2014 03:04:06 +0000 (12:04 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jan 2014 19:54:43 +0000 (11:54 -0800)
If used 64 bit compiler GCC warns that:

drivers/net/ethernet/smsc/smc91x.c:1897:7:
warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]

This patch fixes this by changing typecast from "unsigned int" to "unsigned long"

CC: "David S. Miller" <davem@davemloft.net>
CC: Jingoo Han <jg1.han@samsung.com>
CC: netdev@vger.kernel.org
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/smc91x.c

index 96f79f7c439546dc1f015dfea3055b5cb0492ae6..a6a9e1ebe30c5eb0d849d8e63db667923fbce62d 100644 (file)
@@ -1894,7 +1894,7 @@ static int smc_probe(struct net_device *dev, void __iomem *ioaddr,
        SMC_SELECT_BANK(lp, 1);
        val = SMC_GET_BASE(lp);
        val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
-       if (((unsigned int)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
+       if (((unsigned long)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
                netdev_warn(dev, "%s: IOADDR %p doesn't match configuration (%x).\n",
                            CARDNAME, ioaddr, val);
        }