arch/sh/include/asm/mmu_context.h:151:9: sparse: sparse: incorrect type in argument 1 (different base types)
From: kernel test robot
Date: Sat May 08 2021 - 11:41:38 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd860052c99b1e088352bdd4fb7aef46f8d2ef47
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 8 months ago
config: sh-randconfig-s032-20210508 (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-341-g8af24329-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__' W=1 ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
arch/sh/kernel/setup.c: note: in included file:
>> arch/sh/include/asm/mmu_context.h:151:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/mmu_context.h:151:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/mmu_context.h:151:9: sparse: got unsigned int
--
>> drivers/mmc/host/dw_mmc.c:602:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/mmc/host/dw_mmc.c:602:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:602:29: sparse: got unsigned int *
>> drivers/mmc/host/dw_mmc.c:602:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int * @@
drivers/mmc/host/dw_mmc.c:602:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:602:29: sparse: got unsigned int *
drivers/mmc/host/dw_mmc.c:615:25: sparse: sparse: restricted __le32 degrades to integer
drivers/mmc/host/dw_mmc.c:615:25: sparse: sparse: restricted __le32 degrades to integer
>> drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/mmc/host/dw_mmc.c:674:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:674:29: sparse: got restricted __le32 *
drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: restricted __le32 degrades to integer
>> drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got restricted __le32 * @@
drivers/mmc/host/dw_mmc.c:674:29: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/mmc/host/dw_mmc.c:674:29: sparse: got restricted __le32 *
drivers/mmc/host/dw_mmc.c:674:29: sparse: sparse: restricted __le32 degrades to integer
vim +151 arch/sh/include/asm/mmu_context.h
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 139
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 140 #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4)
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 141 /*
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 142 * If this processor has an MMU, we need methods to turn it off/on ..
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 143 * paging_init() will also have to be updated for the processor in
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 144 * question.
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 145 */
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 146 static inline void enable_mmu(void)
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 147 {
aec5e0e1c179fa include/asm-sh/mmu_context.h Paul Mundt 2006-12-25 148 unsigned int cpu = smp_processor_id();
aec5e0e1c179fa include/asm-sh/mmu_context.h Paul Mundt 2006-12-25 149
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 150 /* Enable MMU */
9d56dd3b083a3b arch/sh/include/asm/mmu_context.h Paul Mundt 2010-01-26 @151 __raw_writel(MMU_CONTROL_INIT, MMUCR);
298476220d1f79 include/asm-sh/mmu_context.h Paul Mundt 2006-09-27 152 ctrl_barrier();
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 153
aec5e0e1c179fa include/asm-sh/mmu_context.h Paul Mundt 2006-12-25 154 if (asid_cache(cpu) == NO_CONTEXT)
aec5e0e1c179fa include/asm-sh/mmu_context.h Paul Mundt 2006-12-25 155 asid_cache(cpu) = MMU_CONTEXT_FIRST_VERSION;
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 156
aec5e0e1c179fa include/asm-sh/mmu_context.h Paul Mundt 2006-12-25 157 set_asid(asid_cache(cpu) & MMU_CONTEXT_ASID_MASK);
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 158 }
^1da177e4c3f41 include/asm-sh/mmu_context.h Linus Torvalds 2005-04-16 159
:::::: The code at line 151 was first introduced by commit
:::::: 9d56dd3b083a3bec56e9da35ce07baca81030b03 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip