mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-11-08  1:04 kernel test robot
  2023-11-10 15:42 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-11-08  1:04 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: oe-kbuild-all, linux-kernel, Thomas Gleixner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   13d88ac54ddd1011b6e94443958e798aa06eb835
commit: 9458e0a78c45bc6537ce11eb9f03489eab92f9c2 flex_proportions: Disable preemption entering the write section.
date:   1 year, 2 months ago
config: loongarch-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231108/202311080840.Vc2kXhfp-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231108/202311080840.Vc2kXhfp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311080840.Vc2kXhfp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got unsigned int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got unsigned int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got unsigned int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got unsigned int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got int [noderef] __percpu *
>> lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   lib/flex_proportions.c:73:9: sparse:     expected void *ptr
   lib/flex_proportions.c:73:9: sparse:     got int [noderef] __percpu *
   lib/flex_proportions.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/percpu_counter.h, ...):
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got unsigned int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got unsigned int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got unsigned int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got unsigned int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got int [noderef] __percpu *
   include/linux/seqlock.h:269:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   include/linux/seqlock.h:269:9: sparse:     expected void *ptr
   include/linux/seqlock.h:269:9: sparse:     got int [noderef] __percpu *

vim +73 lib/flex_proportions.c

    55	
    56	/*
    57	 * Declare @periods new periods. It is upto the caller to make sure period
    58	 * transitions cannot happen in parallel.
    59	 *
    60	 * The function returns true if the proportions are still defined and false
    61	 * if aging zeroed out all events. This can be used to detect whether declaring
    62	 * further periods has any effect.
    63	 */
    64	bool fprop_new_period(struct fprop_global *p, int periods)
    65	{
    66		s64 events = percpu_counter_sum(&p->events);
    67	
    68		/*
    69		 * Don't do anything if there are no events.
    70		 */
    71		if (events <= 1)
    72			return false;
  > 73		preempt_disable_nested();
    74		write_seqcount_begin(&p->sequence);
    75		if (periods < 64)
    76			events -= events >> periods;
    77		/* Use addition to avoid losing events happening between sum and set */
    78		percpu_counter_add(&p->events, -events);
    79		p->period += periods;
    80		write_seqcount_end(&p->sequence);
    81		preempt_enable_nested();
    82	
    83		return true;
    84	}
    85	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-11  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-08  1:04 lib/flex_proportions.c:73:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2023-11-10 15:42 ` Sebastian Andrzej Siewior
2023-11-11  1:54   ` Philip Li
2023-11-11  9:42     ` Philip Li

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

Powered by JetHome