net: smc91x: Do not cast pointer to int
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 9 May 2013 08:48:54 +0000 (08:48 +0000)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:04:35 +0000 (11:04 +0100)
The patch removes a compiler warning when casting the ioaddr pointer to
(unsigned int) in the smc_probe() function of the smc91x.c driver. The
casting is now done to (unsigned long).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
drivers/net/ethernet/smsc/smc91x.c

index dfbf978315dfb31a8cbbd01ce5beae06abc5f398..bdd703c6bf167196b2370120c19abfadcb178269 100644 (file)
@@ -1896,7 +1896,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) {
                printk("%s: IOADDR %p doesn't match configuration (%x).\n",
                        CARDNAME, ioaddr, val);
        }