All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces)
@ 2019-06-03 11:39 kbuild test robot
  2019-06-03 12:38 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-06-03 11:39 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: kbuild-all, netdev

Hi Arnd,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   b33bc2b878e05c5dd4e20682328c3addb4787ac9
commit: 6d97985072dc270032dc7a08631080bfd6253e82 [391/455] isdn: move capi drivers to staging
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        git checkout 6d97985072dc270032dc7a08631080bfd6253e82
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
>> drivers/staging/isdn/avm/b1.c:163:49: sparse:    expected void const [noderef] <asn:1> *from
>> drivers/staging/isdn/avm/b1.c:163:49: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/b1.c:179:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/b1.c:179:49: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/b1.c:179:49: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/b1.c:211:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/b1.c:211:49: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/b1.c:211:49: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/b1.c:227:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/b1.c:227:49: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/b1.c:227:49: sparse:    got unsigned char *[assigned] dp
--
>> drivers/staging/isdn/avm/c4.c:206:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
>> drivers/staging/isdn/avm/c4.c:206:50: sparse:    expected void const [noderef] <asn:1> *from
>> drivers/staging/isdn/avm/c4.c:206:50: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/c4.c:223:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/c4.c:223:50: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/c4.c:223:50: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/c4.c:830:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/c4.c:830:49: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/c4.c:830:49: sparse:    got unsigned char *[assigned] dp
   drivers/staging/isdn/avm/c4.c:843:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
   drivers/staging/isdn/avm/c4.c:843:50: sparse:    expected void const [noderef] <asn:1> *from
   drivers/staging/isdn/avm/c4.c:843:50: sparse:    got unsigned char *[assigned] dp
--
>> drivers/staging/isdn/hysdn/boardergo.c:402:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void volatile [noderef] <asn:2> *addr @@    got oderef] <asn:2> *addr @@
>> drivers/staging/isdn/hysdn/boardergo.c:402:21: sparse:    expected void volatile [noderef] <asn:2> *addr
>> drivers/staging/isdn/hysdn/boardergo.c:402:21: sparse:    got void *[usertype] dpram
>> drivers/staging/isdn/hysdn/boardergo.c:422:27: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected void *[usertype] dpram @@    got void [nvoid *[usertype] dpram @@
>> drivers/staging/isdn/hysdn/boardergo.c:422:27: sparse:    expected void *[usertype] dpram
>> drivers/staging/isdn/hysdn/boardergo.c:422:27: sparse:    got void [noderef] <asn:2> *
--
>> drivers/staging/isdn/hysdn/hysdn_net.c:72:29: sparse: sparse: incorrect type in assignment (different address spaces) @@    expected struct in_device *in_dev @@    got struct in_device [struct in_device *in_dev @@
>> drivers/staging/isdn/hysdn/hysdn_net.c:72:29: sparse:    expected struct in_device *in_dev
>> drivers/staging/isdn/hysdn/hysdn_net.c:72:29: sparse:    got struct in_device [noderef] <asn:4> *ip_ptr

vim +163 drivers/staging/isdn/avm/b1.c

^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  150  
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  151  #define FWBUF_SIZE	256
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  152  int b1_load_t4file(avmcard *card, capiloaddatapart *t4file)
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  153  {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  154  	unsigned char buf[FWBUF_SIZE];
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  155  	unsigned char *dp;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  156  	int i, left;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  157  	unsigned int base = card->port;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  158  
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  159  	dp = t4file->data;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  160  	left = t4file->len;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  161  	while (left > FWBUF_SIZE) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  162  		if (t4file->user) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16 @163  			if (copy_from_user(buf, dp, FWBUF_SIZE))
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  164  				return -EFAULT;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  165  		} else {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  166  			memcpy(buf, dp, FWBUF_SIZE);
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  167  		}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  168  		for (i = 0; i < FWBUF_SIZE; i++)
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  169  			if (b1_save_put_byte(base, buf[i]) < 0) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  170  				printk(KERN_ERR "%s: corrupted firmware file ?\n",
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  171  				       card->name);
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  172  				return -EIO;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  173  			}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  174  		left -= FWBUF_SIZE;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  175  		dp += FWBUF_SIZE;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  176  	}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  177  	if (left) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  178  		if (t4file->user) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  179  			if (copy_from_user(buf, dp, left))
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  180  				return -EFAULT;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  181  		} else {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  182  			memcpy(buf, dp, left);
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  183  		}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  184  		for (i = 0; i < left; i++)
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  185  			if (b1_save_put_byte(base, buf[i]) < 0) {
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  186  				printk(KERN_ERR "%s: corrupted firmware file ?\n",
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  187  				       card->name);
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  188  				return -EIO;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  189  			}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  190  	}
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  191  	return 0;
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  192  }
^1da177e drivers/isdn/hardware/avm/b1.c Linus Torvalds 2005-04-16  193  

:::::: The code at line 163 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces)
  2019-06-03 11:39 [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces) kbuild test robot
@ 2019-06-03 12:38 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2019-06-03 12:38 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, Networking, driverdevel, gregkh

On Mon, Jun 3, 2019 at 1:40 PM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Arnd,
>
> First bad commit (maybe != root cause):

Yep:

> >> drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected void const [noderef] <asn:1> *from @@    got  const [noderef] <asn:1> *from @@
> >> drivers/staging/isdn/avm/b1.c:163:49: sparse:    expected void const [noderef] <asn:1> *from
> >> drivers/staging/isdn/avm/b1.c:163:49: sparse:    got unsigned char *[assigned] dp

I only moved the file, so the warnings are now for a different pathname.

I'll leave it for the staging driver crowd to fix them up, or ignore them as the
driver is on  its way out of the kernel.

     Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-03 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-03 11:39 [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces) kbuild test robot
2019-06-03 12:38 ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.