mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Andrea Greco <andrea.greco.gapmilano@gmail.com>
Cc: kbuild-all@01.org, tobin@apporbit.com,
	andrea.greco.gapmilano@gmail.com,
	Andrea Greco <a.greco@4sigma.it>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] arcnet: com20020: Add com20020 io mapped version
Date: Sun, 20 May 2018 10:59:59 +0800	[thread overview]
Message-ID: <201805200905.0BxHYeFh%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180517130529.2684-1-andrea.greco.gapmilano@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11468 bytes --]

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@perches.com>
:::::: CC: Michael Grzeschik <m.grzeschik@pengutronix.de>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52431 bytes --]

  parent reply	other threads:[~2018-05-20  3:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 13:05 Andrea Greco
2018-05-17 20:31 ` David Miller
2018-05-18 12:18   ` Andrea Greco
2018-05-18 17:51     ` David Miller
2018-05-22 14:44       ` Andrea Greco
2018-05-20  2:13 ` kbuild test robot
2018-05-20  2:59 ` kbuild test robot [this message]
2018-05-20  3:31 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201805200905.0BxHYeFh%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=a.greco@4sigma.it \
    --cc=andrea.greco.gapmilano@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=tobin@apporbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®