public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [frederic-dynticks:isolation/split 9/13] include/linux/cpumask.h:610:26: error: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type
Date: Thu, 28 Oct 2021 12:35:09 +0800	[thread overview]
Message-ID: <202110281256.GbX38DG2-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git isolation/split
head:   c4988a7256e9e02fb2503a7a0e748ab7b50667b6
commit: 8ea31dca120d4d746a70867c26ca97bb9f4b0471 [9/13] rcu/nocb: Pass a cpumask instead of a single CPU to offload/deoffload
config: openrisc-buildonly-randconfig-r001-20211027 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.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=8ea31dca120d4d746a70867c26ca97bb9f4b0471
        git remote add frederic-dynticks https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
        git fetch --no-tags frederic-dynticks isolation/split
        git checkout 8ea31dca120d4d746a70867c26ca97bb9f4b0471
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   kernel/rcu/rcutorture.c: In function 'rcu_nocb_toggle':
>> include/linux/cpumask.h:610:26: error: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     610 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1718:49: note: in expansion of macro 'cpumask_of'
    1718 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), true);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:10,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:119:59: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     119 | static inline int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload)
         |                                           ~~~~~~~~~~~~~~~~^~~~~~~
   In file included from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
>> include/linux/cpumask.h:610:26: error: passing argument 1 of 'rcu_nocb_cpumask_update' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     610 | #define cpumask_of(cpu) (get_cpu_mask(cpu))
         |                         ~^~~~~~~~~~~~~~~~~~
   kernel/rcu/rcutorture.c:1721:49: note: in expansion of macro 'cpumask_of'
    1721 |                         rcu_nocb_cpumask_update(cpumask_of(cpu), false);
         |                                                 ^~~~~~~~~~
   In file included from include/linux/rbtree.h:24,
                    from include/linux/mm_types.h:10,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/rcu/rcutorture.c:18:
   include/linux/rcupdate.h:119:59: note: expected 'struct cpumask *' but argument is of type 'const struct cpumask *'
     119 | static inline int rcu_nocb_cpumask_update(struct cpumask *cpumask, bool offload)
         |                                           ~~~~~~~~~~~~~~~~^~~~~~~
   cc1: all warnings being treated as errors


vim +610 include/linux/cpumask.h

2d3854a37e8b76 Rusty Russell 2008-11-05  605  
cd83e42c6b0413 Rusty Russell 2008-11-07  606  /**
cd83e42c6b0413 Rusty Russell 2008-11-07  607   * cpumask_of - the cpumask containing just a given cpu
cd83e42c6b0413 Rusty Russell 2008-11-07  608   * @cpu: the cpu (<= nr_cpu_ids)
cd83e42c6b0413 Rusty Russell 2008-11-07  609   */
cd83e42c6b0413 Rusty Russell 2008-11-07 @610  #define cpumask_of(cpu) (get_cpu_mask(cpu))
cd83e42c6b0413 Rusty Russell 2008-11-07  611  

:::::: The code at line 610 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, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2021-10-28  4:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202110281256.GbX38DG2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=frederic@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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