public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [frederic-dynticks:cpuset/nocb 1/4] include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type
@ 2022-05-25 22:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-25 22:53 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git cpuset/nocb
head:   ad895c0b6a5e3c41d46f184900d193e70bfc90d3
commit: 25db09cc1131b612d5dbb474ea1640b90b2518ca [1/4] rcu/nocb: Pass a cpumask instead of a single CPU to offload/deoffload
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220526/202205260631.a3Mk6u8a-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git/commit/?id=25db09cc1131b612d5dbb474ea1640b90b2518ca
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks cpuset/nocb
        git checkout 25db09cc1131b612d5dbb474ea1640b90b2518ca
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/rcu/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/smp.h:13,
                    from arch/mips/include/asm/cpu-type.h:12,
                    from arch/mips/include/asm/timex.h:19,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from kernel/rcu/rcutorture.c:18:
   kernel/rcu/rcutorture.c: In function 'rcu_nocb_toggle':
>> include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     636 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1890:49: note: in expansion of macro 'cpumask_of'
    1890 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), true);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:11,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:117:45: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     117 | int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload);
         |                             ~~~~~~~~~~~~~~~~^~~~~~~
   In file included from include/linux/smp.h:13,
                    from arch/mips/include/asm/cpu-type.h:12,
                    from arch/mips/include/asm/timex.h:19,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from kernel/rcu/rcutorture.c:18:
>> include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     636 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1893:49: note: in expansion of macro 'cpumask_of'
    1893 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), false);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:11,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:117:45: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     117 | int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload);
         |                             ~~~~~~~~~~~~~~~~^~~~~~~


vim +636 include/linux/cpumask.h

2d3854a37e8b767 Rusty Russell 2008-11-05  631  
cd83e42c6b0413d Rusty Russell 2008-11-07  632  /**
cd83e42c6b0413d Rusty Russell 2008-11-07  633   * cpumask_of - the cpumask containing just a given cpu
cd83e42c6b0413d Rusty Russell 2008-11-07  634   * @cpu: the cpu (<= nr_cpu_ids)
cd83e42c6b0413d Rusty Russell 2008-11-07  635   */
cd83e42c6b0413d Rusty Russell 2008-11-07 @636  #define cpumask_of(cpu) (get_cpu_mask(cpu))
cd83e42c6b0413d Rusty Russell 2008-11-07  637  

:::::: The code at line 636 was first introduced by commit
:::::: cd83e42c6b0413dcbb548c2ead799111ff7e6a13 cpumask: new API, v2

:::::: TO: Rusty Russell <rusty@rustcorp.com.au>
:::::: CC: Ingo Molnar <mingo@elte.hu>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-05-25 22:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25 22:53 [frederic-dynticks:cpuset/nocb 1/4] include/linux/cpumask.h:636:26: warning: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type 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