linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/sh/kernel/ftrace.c:274:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2021-02-27  5:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-27  5:49 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel, Miguel Ojeda

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   6 months ago
config: sh-randconfig-s031-20210227 (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-241-geaceeafa-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/ftrace.c:50:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned char * @@
   arch/sh/kernel/ftrace.c:50:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:50:9: sparse:     got unsigned char *
   arch/sh/kernel/ftrace.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned char * @@
   arch/sh/kernel/ftrace.c:57:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:57:9: sparse:     got unsigned char *
>> arch/sh/kernel/ftrace.c:274:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long * @@
   arch/sh/kernel/ftrace.c:274:25: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:274:25: sparse:     got unsigned long *
>> arch/sh/kernel/ftrace.c:277:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long ip @@
   arch/sh/kernel/ftrace.c:277:9: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:277:9: sparse:     got unsigned long ip
   arch/sh/kernel/ftrace.c:368:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *ptr @@     got unsigned long *parent @@
   arch/sh/kernel/ftrace.c:368:17: sparse:     expected void const volatile [noderef] __iomem *ptr
   arch/sh/kernel/ftrace.c:368:17: sparse:     got unsigned long *parent

vim +274 arch/sh/kernel/ftrace.c

327933f5d6cdf0 Matt Fleming      2009-07-11  265  
327933f5d6cdf0 Matt Fleming      2009-07-11  266  static int ftrace_mod(unsigned long ip, unsigned long old_addr,
327933f5d6cdf0 Matt Fleming      2009-07-11  267  		      unsigned long new_addr)
327933f5d6cdf0 Matt Fleming      2009-07-11  268  {
327933f5d6cdf0 Matt Fleming      2009-07-11  269  	unsigned char code[MCOUNT_INSN_SIZE];
327933f5d6cdf0 Matt Fleming      2009-07-11  270  
fe557319aa06c2 Christoph Hellwig 2020-06-17  271  	if (copy_from_kernel_nofault(code, (void *)ip, MCOUNT_INSN_SIZE))
327933f5d6cdf0 Matt Fleming      2009-07-11  272  		return -EFAULT;
327933f5d6cdf0 Matt Fleming      2009-07-11  273  
327933f5d6cdf0 Matt Fleming      2009-07-11 @274  	if (old_addr != __raw_readl((unsigned long *)code))
327933f5d6cdf0 Matt Fleming      2009-07-11  275  		return -EINVAL;
327933f5d6cdf0 Matt Fleming      2009-07-11  276  
327933f5d6cdf0 Matt Fleming      2009-07-11 @277  	__raw_writel(new_addr, ip);
327933f5d6cdf0 Matt Fleming      2009-07-11  278  	return 0;
327933f5d6cdf0 Matt Fleming      2009-07-11  279  }
327933f5d6cdf0 Matt Fleming      2009-07-11  280  

:::::: The code at line 274 was first introduced by commit
:::::: 327933f5d6cdf083284d3c06e0370d1de464aef4 sh: Function graph tracer support

:::::: TO: Matt Fleming <matt@console-pimps.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

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

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

only message in thread, other threads:[~2021-02-27  5:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27  5:49 arch/sh/kernel/ftrace.c:274:25: 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;
as well as URLs for NNTP newsgroup(s).