Re: [PATCH 1/4] arcnet: com20020: Add com20020 io mapped version
From: kbuild test robot
Date: Sat May 19 2018 - 22:04:56 EST
Hi Andrea,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on v4.17-rc5 next-20180517]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andrea-Greco/arcnet-com20020-Add-com20020-io-mapped-version/20180520-083936
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha
All warnings (new ones prefixed by >>):
In file included from drivers/net/arcnet/com20020-isa.c:44:0:
drivers/net/arcnet/com20020.h: In function 'com20020_set_subaddress':
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020.h:126:3: note: in expansion of macro 'arcnet_outb'
arcnet_outb(lp->config, ioaddr, COM20020_REG_W_CONFIG);
^~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020.h:128:3: note: in expansion of macro 'arcnet_outb'
arcnet_outb(val, ioaddr, COM20020_REG_W_SUBADR);
^~~~~~~~~~~
drivers/net/arcnet/com20020-isa.c: In function 'com20020isa_probe':
drivers/net/arcnet/arcdevice.h:376:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ioread8((void __iomem *)(addr) + BUS_ALIGN * offset)
^
>> drivers/net/arcnet/com20020-isa.c:70:6: note: in expansion of macro 'arcnet_inb'
if (arcnet_inb(ioaddr, COM20020_REG_R_STATUS) == 0xFF) {
^~~~~~~~~~
drivers/net/arcnet/arcdevice.h:376:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ioread8((void __iomem *)(addr) + BUS_ALIGN * offset)
^
drivers/net/arcnet/arcdevice.h:88:28: note: in expansion of macro 'arcnet_inb'
netdev_warn(dev, fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
>> drivers/net/arcnet/com20020-isa.c:85:3: note: in expansion of macro 'arc_printk'
arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
^~~~~~~~~~
drivers/net/arcnet/arcdevice.h:376:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ioread8((void __iomem *)(addr) + BUS_ALIGN * offset)
^
drivers/net/arcnet/arcdevice.h:90:28: note: in expansion of macro 'arcnet_inb'
netdev_info(dev, fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
>> drivers/net/arcnet/com20020-isa.c:85:3: note: in expansion of macro 'arc_printk'
arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
^~~~~~~~~~
drivers/net/arcnet/arcdevice.h:376:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ioread8((void __iomem *)(addr) + BUS_ALIGN * offset)
^
include/linux/dynamic_debug.h:144:12: note: in expansion of macro 'arcnet_inb'
##__VA_ARGS__); \
^~~~~~~~~~~
include/linux/netdevice.h:4419:2: note: in expansion of macro 'dynamic_netdev_dbg'
dynamic_netdev_dbg(__dev, format, ##args); \
^~~~~~~~~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:92:4: note: in expansion of macro 'netdev_dbg'
netdev_dbg(dev, fmt, ##__VA_ARGS__); \
^~~~~~~~~~
>> drivers/net/arcnet/com20020-isa.c:85:3: note: in expansion of macro 'arc_printk'
arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
^~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
>> drivers/net/arcnet/com20020-isa.c:87:3: note: in expansion of macro 'arcnet_outb'
arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020-isa.c:89:3: note: in expansion of macro 'arcnet_outb'
arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
^~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020-isa.c:91:3: note: in expansion of macro 'arcnet_outb'
arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020-isa.c:97:4: note: in expansion of macro 'arcnet_outb'
arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
^~~~~~~~~~~
drivers/net/arcnet/arcdevice.h:379:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
iowrite8(value, (void __iomem *)addr + BUS_ALIGN * offset)
^
drivers/net/arcnet/com20020-isa.c:99:4: note: in expansion of macro 'arcnet_outb'
arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^~~~~~~~~~~
vim +/arcnet_inb +70 drivers/net/arcnet/com20020-isa.c
26c6d281 Joe Perches 2015-05-05 46
f2f0a16b Joe Perches 2015-05-05 47 /* We cannot (yet) probe for an IO mapped card, although we can check that
^1da177e Linus Torvalds 2005-04-16 48 * it's where we were told it was, and even do autoirq.
^1da177e Linus Torvalds 2005-04-16 49 */
^1da177e Linus Torvalds 2005-04-16 50 static int __init com20020isa_probe(struct net_device *dev)
^1da177e Linus Torvalds 2005-04-16 51 {
^1da177e Linus Torvalds 2005-04-16 52 int ioaddr;
^1da177e Linus Torvalds 2005-04-16 53 unsigned long airqmask;
454d7c9b Wang Chen 2008-11-12 54 struct arcnet_local *lp = netdev_priv(dev);
^1da177e Linus Torvalds 2005-04-16 55 int err;
^1da177e Linus Torvalds 2005-04-16 56
72aeea48 Joe Perches 2015-05-05 57 if (BUGLVL(D_NORMAL))
05a24b23 Joe Perches 2015-05-05 58 pr_info("%s\n", "COM20020 ISA support (by David Woodhouse et al.)");
^1da177e Linus Torvalds 2005-04-16 59
^1da177e Linus Torvalds 2005-04-16 60 ioaddr = dev->base_addr;
^1da177e Linus Torvalds 2005-04-16 61 if (!ioaddr) {
a34c0932 Joe Perches 2015-05-05 62 arc_printk(D_NORMAL, dev, "No autoprobe (yet) for IO mapped cards; you must specify the base address!\n");
^1da177e Linus Torvalds 2005-04-16 63 return -ENODEV;
^1da177e Linus Torvalds 2005-04-16 64 }
^1da177e Linus Torvalds 2005-04-16 65 if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
a34c0932 Joe Perches 2015-05-05 66 arc_printk(D_NORMAL, dev, "IO region %xh-%xh already allocated.\n",
^1da177e Linus Torvalds 2005-04-16 67 ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1);
^1da177e Linus Torvalds 2005-04-16 68 return -ENXIO;
^1da177e Linus Torvalds 2005-04-16 69 }
0fec6513 Joe Perches 2015-05-05 @70 if (arcnet_inb(ioaddr, COM20020_REG_R_STATUS) == 0xFF) {
a34c0932 Joe Perches 2015-05-05 71 arc_printk(D_NORMAL, dev, "IO address %x empty\n", ioaddr);
^1da177e Linus Torvalds 2005-04-16 72 err = -ENODEV;
^1da177e Linus Torvalds 2005-04-16 73 goto out;
^1da177e Linus Torvalds 2005-04-16 74 }
^1da177e Linus Torvalds 2005-04-16 75 if (com20020_check(dev)) {
^1da177e Linus Torvalds 2005-04-16 76 err = -ENODEV;
^1da177e Linus Torvalds 2005-04-16 77 goto out;
^1da177e Linus Torvalds 2005-04-16 78 }
^1da177e Linus Torvalds 2005-04-16 79
^1da177e Linus Torvalds 2005-04-16 80 if (!dev->irq) {
^1da177e Linus Torvalds 2005-04-16 81 /* if we do this, we're sure to get an IRQ since the
^1da177e Linus Torvalds 2005-04-16 82 * card has just reset and the NORXflag is on until
^1da177e Linus Torvalds 2005-04-16 83 * we tell it to start receiving.
^1da177e Linus Torvalds 2005-04-16 84 */
a34c0932 Joe Perches 2015-05-05 @85 arc_printk(D_INIT_REASONS, dev, "intmask was %02Xh\n",
0fec6513 Joe Perches 2015-05-05 86 arcnet_inb(ioaddr, COM20020_REG_R_STATUS));
0fec6513 Joe Perches 2015-05-05 @87 arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^1da177e Linus Torvalds 2005-04-16 88 airqmask = probe_irq_on();
0fec6513 Joe Perches 2015-05-05 89 arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
^1da177e Linus Torvalds 2005-04-16 90 udelay(1);
0fec6513 Joe Perches 2015-05-05 91 arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^1da177e Linus Torvalds 2005-04-16 92 dev->irq = probe_irq_off(airqmask);
^1da177e Linus Torvalds 2005-04-16 93
0a6efc78 Dan Carpenter 2010-07-17 94 if ((int)dev->irq <= 0) {
a34c0932 Joe Perches 2015-05-05 95 arc_printk(D_INIT_REASONS, dev, "Autoprobe IRQ failed first time\n");
^1da177e Linus Torvalds 2005-04-16 96 airqmask = probe_irq_on();
0fec6513 Joe Perches 2015-05-05 97 arcnet_outb(NORXflag, ioaddr, COM20020_REG_W_INTMASK);
^1da177e Linus Torvalds 2005-04-16 98 udelay(5);
0fec6513 Joe Perches 2015-05-05 99 arcnet_outb(0, ioaddr, COM20020_REG_W_INTMASK);
^1da177e Linus Torvalds 2005-04-16 100 dev->irq = probe_irq_off(airqmask);
0a6efc78 Dan Carpenter 2010-07-17 101 if ((int)dev->irq <= 0) {
a34c0932 Joe Perches 2015-05-05 102 arc_printk(D_NORMAL, dev, "Autoprobe IRQ failed.\n");
^1da177e Linus Torvalds 2005-04-16 103 err = -ENODEV;
^1da177e Linus Torvalds 2005-04-16 104 goto out;
^1da177e Linus Torvalds 2005-04-16 105 }
^1da177e Linus Torvalds 2005-04-16 106 }
^1da177e Linus Torvalds 2005-04-16 107 }
^1da177e Linus Torvalds 2005-04-16 108
^1da177e Linus Torvalds 2005-04-16 109 lp->card_name = "ISA COM20020";
97464edd Joe Perches 2015-05-05 110
97464edd Joe Perches 2015-05-05 111 err = com20020_found(dev, 0);
97464edd Joe Perches 2015-05-05 112 if (err != 0)
^1da177e Linus Torvalds 2005-04-16 113 goto out;
^1da177e Linus Torvalds 2005-04-16 114
^1da177e Linus Torvalds 2005-04-16 115 return 0;
^1da177e Linus Torvalds 2005-04-16 116
^1da177e Linus Torvalds 2005-04-16 117 out:
^1da177e Linus Torvalds 2005-04-16 118 release_region(ioaddr, ARCNET_TOTAL_SIZE);
^1da177e Linus Torvalds 2005-04-16 119 return err;
^1da177e Linus Torvalds 2005-04-16 120 }
^1da177e Linus Torvalds 2005-04-16 121
:::::: The code at line 70 was first introduced by commit
:::::: 0fec65130b9f11a73d74f47025491f97f82ba070 arcnet: com20020: Use arcnet_<I/O> routines
:::::: TO: Joe Perches <joe@xxxxxxxxxxx>
:::::: CC: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip