lkml.org 
[lkml]   [2021]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectarch/sh/kernel/cpu/sh3/probe.c:96:17: sparse: sparse: incorrect type in argument 1 (different base types)
Hi Luc,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 61556703b610a104de324e4f061dc6cf7b218b46
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 5 months ago
config: sh-randconfig-s032-20210204 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh

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/kernel/cpu/sh3/probe.c:30:18: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:30:18: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:30:18: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:31:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:31:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:31:9: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:32:18: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr1 @@
arch/sh/kernel/cpu/sh3/probe.c:32:18: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:32:18: sparse: got unsigned long [assigned] addr1
arch/sh/kernel/cpu/sh3/probe.c:33:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr1 @@
arch/sh/kernel/cpu/sh3/probe.c:33:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:33:9: sparse: got unsigned long [assigned] addr1
arch/sh/kernel/cpu/sh3/probe.c:36:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:36:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:36:17: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:38:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:38:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:38:9: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:39:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr1 @@
arch/sh/kernel/cpu/sh3/probe.c:39:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:39:17: sparse: got unsigned long [assigned] addr1
arch/sh/kernel/cpu/sh3/probe.c:41:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr1 @@
arch/sh/kernel/cpu/sh3/probe.c:41:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:41:9: sparse: got unsigned long [assigned] addr1
arch/sh/kernel/cpu/sh3/probe.c:42:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:42:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:42:17: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:45:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr0 @@
arch/sh/kernel/cpu/sh3/probe.c:45:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:45:9: sparse: got unsigned long [assigned] addr0
arch/sh/kernel/cpu/sh3/probe.c:46:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned long [assigned] addr1 @@
arch/sh/kernel/cpu/sh3/probe.c:46:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:46:9: sparse: got unsigned long [assigned] addr1
>> arch/sh/kernel/cpu/sh3/probe.c:96:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/probe.c:96:17: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/probe.c:96:17: sparse: got unsigned int
--
>> arch/sh/kernel/cpu/sh3/clock-sh7705.c:32:35: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/clock-sh7705.c:32:35: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/clock-sh7705.c:32:35: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/clock-sh7705.c:41:19: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/clock-sh7705.c:41:19: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/clock-sh7705.c:41:19: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/clock-sh7705.c:51:20: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/clock-sh7705.c:51:20: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/clock-sh7705.c:51:20: sparse: got unsigned int
arch/sh/kernel/cpu/sh3/clock-sh7705.c:61:20: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/kernel/cpu/sh3/clock-sh7705.c:61:20: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/kernel/cpu/sh3/clock-sh7705.c:61:20: sparse: got unsigned int
--
drivers/rtc/rtc-m41t80.c:736:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/rtc/rtc-m41t80.c:736:21: sparse: expected int const *__gu_addr
drivers/rtc/rtc-m41t80.c:736:21: sparse: got int [noderef] __user *
>> drivers/rtc/rtc-m41t80.c:736:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/rtc/rtc-m41t80.c:736:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/rtc/rtc-m41t80.c:736:21: sparse: got int const *__gu_addr
--
drivers/media/rc/lirc_dev.c:378:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user *argp @@
drivers/media/rc/lirc_dev.c:378:23: sparse: expected unsigned int const *__gu_addr
drivers/media/rc/lirc_dev.c:378:23: sparse: got unsigned int [noderef] [usertype] __user *argp
>> drivers/media/rc/lirc_dev.c:378:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/media/rc/lirc_dev.c:378:23: sparse: expected void const volatile [noderef] __user *ptr
drivers/media/rc/lirc_dev.c:378:23: sparse: got unsigned int const *__gu_addr

vim +96 arch/sh/kernel/cpu/sh3/probe.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 15
4603f53a1dc3c7 Paul Gortmaker 2013-06-18 16 void cpu_probe(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 17 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 18 unsigned long addr0, addr1, data0, data1, data2, data3;
^1da177e4c3f41 Linus Torvalds 2005-04-16 19
cbaa118ecfd99f Stuart Menefy 2007-11-30 20 jump_to_uncached();
^1da177e4c3f41 Linus Torvalds 2005-04-16 21 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 22 * Check if the entry shadows or not.
^1da177e4c3f41 Linus Torvalds 2005-04-16 23 * When shadowed, it's 128-entry system.
^1da177e4c3f41 Linus Torvalds 2005-04-16 24 * Otherwise, it's 256-entry system.
^1da177e4c3f41 Linus Torvalds 2005-04-16 25 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 26 addr0 = CACHE_OC_ADDRESS_ARRAY + (3 << 12);
^1da177e4c3f41 Linus Torvalds 2005-04-16 27 addr1 = CACHE_OC_ADDRESS_ARRAY + (1 << 12);
^1da177e4c3f41 Linus Torvalds 2005-04-16 28
^1da177e4c3f41 Linus Torvalds 2005-04-16 29 /* First, write back & invalidate */
9d56dd3b083a3b Paul Mundt 2010-01-26 30 data0 = __raw_readl(addr0);
9d56dd3b083a3b Paul Mundt 2010-01-26 31 __raw_writel(data0&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr0);
9d56dd3b083a3b Paul Mundt 2010-01-26 32 data1 = __raw_readl(addr1);
9d56dd3b083a3b Paul Mundt 2010-01-26 33 __raw_writel(data1&~(SH_CACHE_VALID|SH_CACHE_UPDATED), addr1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 34
^1da177e4c3f41 Linus Torvalds 2005-04-16 35 /* Next, check if there's shadow or not */
9d56dd3b083a3b Paul Mundt 2010-01-26 36 data0 = __raw_readl(addr0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 37 data0 ^= SH_CACHE_VALID;
9d56dd3b083a3b Paul Mundt 2010-01-26 38 __raw_writel(data0, addr0);
9d56dd3b083a3b Paul Mundt 2010-01-26 39 data1 = __raw_readl(addr1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 40 data2 = data1 ^ SH_CACHE_VALID;
9d56dd3b083a3b Paul Mundt 2010-01-26 41 __raw_writel(data2, addr1);
9d56dd3b083a3b Paul Mundt 2010-01-26 42 data3 = __raw_readl(addr0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 43
^1da177e4c3f41 Linus Torvalds 2005-04-16 44 /* Lastly, invaliate them. */
9d56dd3b083a3b Paul Mundt 2010-01-26 45 __raw_writel(data0&~SH_CACHE_VALID, addr0);
9d56dd3b083a3b Paul Mundt 2010-01-26 46 __raw_writel(data2&~SH_CACHE_VALID, addr1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 47
cbaa118ecfd99f Stuart Menefy 2007-11-30 48 back_to_cached();
^1da177e4c3f41 Linus Torvalds 2005-04-16 49
cb7af21f7d370e Paul Mundt 2007-09-27 50 boot_cpu_data.dcache.ways = 4;
cb7af21f7d370e Paul Mundt 2007-09-27 51 boot_cpu_data.dcache.entry_shift = 4;
cb7af21f7d370e Paul Mundt 2007-09-27 52 boot_cpu_data.dcache.linesz = L1_CACHE_BYTES;
cb7af21f7d370e Paul Mundt 2007-09-27 53 boot_cpu_data.dcache.flags = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 54
^1da177e4c3f41 Linus Torvalds 2005-04-16 55 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 56 * 7709A/7729 has 16K cache (256-entry), while 7702 has only
^1da177e4c3f41 Linus Torvalds 2005-04-16 57 * 2K(direct) 7702 is not supported (yet)
^1da177e4c3f41 Linus Torvalds 2005-04-16 58 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 59 if (data0 == data1 && data2 == data3) { /* Shadow */
cb7af21f7d370e Paul Mundt 2007-09-27 60 boot_cpu_data.dcache.way_incr = (1 << 11);
cb7af21f7d370e Paul Mundt 2007-09-27 61 boot_cpu_data.dcache.entry_mask = 0x7f0;
cb7af21f7d370e Paul Mundt 2007-09-27 62 boot_cpu_data.dcache.sets = 128;
cb7af21f7d370e Paul Mundt 2007-09-27 63 boot_cpu_data.type = CPU_SH7708;
^1da177e4c3f41 Linus Torvalds 2005-04-16 64
cb7af21f7d370e Paul Mundt 2007-09-27 65 boot_cpu_data.flags |= CPU_HAS_MMU_PAGE_ASSOC;
^1da177e4c3f41 Linus Torvalds 2005-04-16 66 } else { /* 7709A or 7729 */
cb7af21f7d370e Paul Mundt 2007-09-27 67 boot_cpu_data.dcache.way_incr = (1 << 12);
cb7af21f7d370e Paul Mundt 2007-09-27 68 boot_cpu_data.dcache.entry_mask = 0xff0;
cb7af21f7d370e Paul Mundt 2007-09-27 69 boot_cpu_data.dcache.sets = 256;
cb7af21f7d370e Paul Mundt 2007-09-27 70 boot_cpu_data.type = CPU_SH7729;
^1da177e4c3f41 Linus Torvalds 2005-04-16 71
e5723e0eeb2dc1 Paul Mundt 2006-09-27 72 #if defined(CONFIG_CPU_SUBTYPE_SH7706)
cb7af21f7d370e Paul Mundt 2007-09-27 73 boot_cpu_data.type = CPU_SH7706;
e5723e0eeb2dc1 Paul Mundt 2006-09-27 74 #endif
e5723e0eeb2dc1 Paul Mundt 2006-09-27 75 #if defined(CONFIG_CPU_SUBTYPE_SH7710)
cb7af21f7d370e Paul Mundt 2007-09-27 76 boot_cpu_data.type = CPU_SH7710;
e5723e0eeb2dc1 Paul Mundt 2006-09-27 77 #endif
9465a54fa4a9da Nobuhiro Iwamatsu 2007-03-27 78 #if defined(CONFIG_CPU_SUBTYPE_SH7712)
cb7af21f7d370e Paul Mundt 2007-09-27 79 boot_cpu_data.type = CPU_SH7712;
9465a54fa4a9da Nobuhiro Iwamatsu 2007-03-27 80 #endif
3ea6bc3de4f15f Markus Brunner 2007-08-20 81 #if defined(CONFIG_CPU_SUBTYPE_SH7720)
cb7af21f7d370e Paul Mundt 2007-09-27 82 boot_cpu_data.type = CPU_SH7720;
3ea6bc3de4f15f Markus Brunner 2007-08-20 83 #endif
31a49c4bf8f964 Yoshihiro Shimoda 2007-12-26 84 #if defined(CONFIG_CPU_SUBTYPE_SH7721)
31a49c4bf8f964 Yoshihiro Shimoda 2007-12-26 85 boot_cpu_data.type = CPU_SH7721;
31a49c4bf8f964 Yoshihiro Shimoda 2007-12-26 86 #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16 87 #if defined(CONFIG_CPU_SUBTYPE_SH7705)
cb7af21f7d370e Paul Mundt 2007-09-27 88 boot_cpu_data.type = CPU_SH7705;
^1da177e4c3f41 Linus Torvalds 2005-04-16 89
^1da177e4c3f41 Linus Torvalds 2005-04-16 90 #if defined(CONFIG_SH7705_CACHE_32KB)
cb7af21f7d370e Paul Mundt 2007-09-27 91 boot_cpu_data.dcache.way_incr = (1 << 13);
cb7af21f7d370e Paul Mundt 2007-09-27 92 boot_cpu_data.dcache.entry_mask = 0x1ff0;
cb7af21f7d370e Paul Mundt 2007-09-27 93 boot_cpu_data.dcache.sets = 512;
9d56dd3b083a3b Paul Mundt 2010-01-26 94 __raw_writel(CCR_CACHE_32KB, CCR3_REG);
^1da177e4c3f41 Linus Torvalds 2005-04-16 95 #else
9d56dd3b083a3b Paul Mundt 2010-01-26 @96 __raw_writel(CCR_CACHE_16KB, CCR3_REG);

:::::: The code at line 96 was first introduced by commit
:::::: 9d56dd3b083a3bec56e9da35ce07baca81030b03 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.

:::::: TO: Paul Mundt <lethal@linux-sh.org>
:::::: CC: Paul Mundt <lethal@linux-sh.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-02-04 03:54    [W:0.090 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site