public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: kernel test robot <lkp@intel.com>
Cc: Anup Patel <anup.patel@wdc.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmerdabbelt@google.com>,
	Atish Patra <atish.patra@wdc.com>
Subject: Re: [kbuild-all] drivers/clocksource/timer-clint.c:72:24: sparse: sparse: cast removes address space '__iomem' of expression
Date: Thu, 24 Dec 2020 16:30:36 +0800	[thread overview]
Message-ID: <20201224083036.GA29938@intel.com> (raw)
In-Reply-To: <202012241612.ckjAZc2H-lkp@intel.com>

On Thu, Dec 24, 2020 at 04:11:17PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   58cf05f597b03a8212d9ecf2c79ee046d3ee8ad9
> commit: 2ac6795fcc085e8d03649f1bbd0d70aaff612cad clocksource/drivers: Add CLINT timer driver
> date:   4 months ago
> config: riscv-randconfig-s031-20201221 (attached as .config)
> compiler: riscv32-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-184-g1b896707-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2ac6795fcc085e8d03649f1bbd0d70aaff612cad
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 2ac6795fcc085e8d03649f1bbd0d70aaff612cad
>         # 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=riscv 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Hi Anup and all, kindly ignore extra reports against this commit, we will
check why it sends out ~10 duplicated reports. Sorry for the inconvenience.

Thanks

> 
> 
> "sparse warnings: (new ones prefixed by >>)"
> >> drivers/clocksource/timer-clint.c:72:24: sparse: sparse: cast removes address space '__iomem' of expression
> >> drivers/clocksource/timer-clint.c:72:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
>    drivers/clocksource/timer-clint.c:72:24: sparse:     expected void const volatile [noderef] __iomem *addr
>    drivers/clocksource/timer-clint.c:72:24: sparse:     got unsigned int [usertype] *
>    drivers/clocksource/timer-clint.c:70:22: sparse: sparse: cast removes address space '__iomem' of expression
>    drivers/clocksource/timer-clint.c:70:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
>    drivers/clocksource/timer-clint.c:70:22: sparse:     expected void const volatile [noderef] __iomem *addr
>    drivers/clocksource/timer-clint.c:70:22: sparse:     got unsigned int [usertype] *
>    drivers/clocksource/timer-clint.c:219:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void * @@     got struct clock_event_device [noderef] __percpu * @@
>    drivers/clocksource/timer-clint.c:219:36: sparse:     expected void *
>    drivers/clocksource/timer-clint.c:219:36: sparse:     got struct clock_event_device [noderef] __percpu *
> 
> vim +/__iomem +72 drivers/clocksource/timer-clint.c
> 
>     58	
>     59	#ifdef CONFIG_64BIT
>     60	static u64 notrace clint_get_cycles64(void)
>     61	{
>     62		return clint_get_cycles();
>     63	}
>     64	#else /* CONFIG_64BIT */
>     65	static u64 notrace clint_get_cycles64(void)
>     66	{
>     67		u32 hi, lo;
>     68	
>     69		do {
>     70			hi = clint_get_cycles_hi();
>     71			lo = clint_get_cycles();
>   > 72		} while (hi != clint_get_cycles_hi());
>     73	
>     74		return ((u64)hi << 32) | lo;
>     75	}
>     76	#endif /* CONFIG_64BIT */
>     77	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org


      reply	other threads:[~2020-12-24  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24  8:11 drivers/clocksource/timer-clint.c:72:24: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2020-12-24  8:30 ` Philip Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201224083036.GA29938@intel.com \
    --to=philip.li@intel.com \
    --cc=anup.patel@wdc.com \
    --cc=atish.patra@wdc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=palmerdabbelt@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox