public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/scsi/sg.c:425:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-06-03 15:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-03 15:24 UTC (permalink / raw)
  To: Arnd, Bergmann,; +Cc: kbuild-all, linux-kernel, Ben Hutchings

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d6f9469a03d832dcd17041ed67774ffb5f3e73b3
commit: 78ed001d9e7106171e0ee761cd854137dd731302 compat: scsi: sg: fix v3 compat read/write interface
date:   5 months ago
config: sh-randconfig-s031-20200603 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-244-g0ee050a8-dirty
        git checkout 78ed001d9e7106171e0ee761cd854137dd731302
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=sh CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   ./arch/sh/include/generated/uapi/asm/unistd_32.h:409:37: sparse: sparse: no newline at end of file
   drivers/scsi/sg.c:415:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> * @@
   drivers/scsi/sg.c:415:21: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:415:21: sparse:     got int [noderef] <asn:1> *
   drivers/scsi/sg.c:415:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:415:21: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:415:21: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:419:32: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> * @@
   drivers/scsi/sg.c:419:32: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:419:32: sparse:     got int [noderef] <asn:1> *
   drivers/scsi/sg.c:419:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:419:32: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:419:32: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:425:32: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected signed int const *__gu_addr @@     got signed int [noderef] <asn:1> * @@
   drivers/scsi/sg.c:425:32: sparse:     expected signed int const *__gu_addr
   drivers/scsi/sg.c:425:32: sparse:     got signed int [noderef] <asn:1> *
>> drivers/scsi/sg.c:425:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got signed int const *__gu_addr @@
   drivers/scsi/sg.c:425:32: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:425:32: sparse:     got signed int const *__gu_addr
   drivers/scsi/sg.c:431:32: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> * @@
   drivers/scsi/sg.c:431:32: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:431:32: sparse:     got int [noderef] <asn:1> *
   drivers/scsi/sg.c:431:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:431:32: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:431:32: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:638:13: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected char const *__gu_addr @@     got char const [noderef] <asn:1> *[assigned] buf @@
   drivers/scsi/sg.c:638:13: sparse:     expected char const *__gu_addr
   drivers/scsi/sg.c:638:13: sparse:     got char const [noderef] <asn:1> *[assigned] buf
   drivers/scsi/sg.c:638:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got char const *__gu_addr @@
   drivers/scsi/sg.c:638:13: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:638:13: sparse:     got char const *__gu_addr
   drivers/scsi/sg.c:956:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:956:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:956:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:956:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:956:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:956:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:999:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:999:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:999:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:999:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:999:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:999:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:1027:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:1027:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:1027:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:1027:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:1027:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:1027:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:1052:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:1052:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:1052:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:1052:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:1052:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:1052:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:1060:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:1060:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:1060:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:1060:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:1060:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:1060:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:1068:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:1068:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:1068:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:1068:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:1068:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:1068:26: sparse:     got int const *__gu_addr
   drivers/scsi/sg.c:1112:26: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected int const *__gu_addr @@     got int [noderef] <asn:1> *ip @@
   drivers/scsi/sg.c:1112:26: sparse:     expected int const *__gu_addr
   drivers/scsi/sg.c:1112:26: sparse:     got int [noderef] <asn:1> *ip
   drivers/scsi/sg.c:1112:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] <asn:1> * @@     got int const *__gu_addr @@
   drivers/scsi/sg.c:1112:26: sparse:     expected void const volatile [noderef] <asn:1> *
   drivers/scsi/sg.c:1112:26: sparse:     got int const *__gu_addr

vim +425 drivers/scsi/sg.c

   407	
   408	static int get_sg_io_pack_id(int *pack_id, void __user *buf, size_t count)
   409	{
   410		struct sg_header __user *old_hdr = buf;
   411		int reply_len;
   412	
   413		if (count >= SZ_SG_HEADER) {
   414			/* negative reply_len means v3 format, otherwise v1/v2 */
   415			if (get_user(reply_len, &old_hdr->reply_len))
   416				return -EFAULT;
   417	
   418			if (reply_len >= 0)
   419				return get_user(*pack_id, &old_hdr->pack_id);
   420	
   421			if (in_compat_syscall() &&
   422			    count >= sizeof(struct compat_sg_io_hdr)) {
   423				struct compat_sg_io_hdr __user *hp = buf;
   424	
 > 425				return get_user(*pack_id, &hp->pack_id);
   426			}
   427	
   428			if (count >= sizeof(struct sg_io_hdr)) {
   429				struct sg_io_hdr __user *hp = buf;
   430	
   431				return get_user(*pack_id, &hp->pack_id);
   432			}
   433		}
   434	
   435		/* no valid header was passed, so ignore the pack_id */
   436		*pack_id = -1;
   437		return 0;
   438	}
   439	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-03 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 15:24 drivers/scsi/sg.c:425:32: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox