linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ardb:arm32-ti-in-task-v4 4/4] arch/arm/include/asm/switch_to.h:37:56: warning: passing argument 1 of 'task_thread_info' discards 'const' qualifier from pointer target type
@ 2021-09-12 19:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-12 19:45 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: kbuild-all, linux-kernel, Keith Packard

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

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm32-ti-in-task-v4
head:   93cf46e56e4b898a98c156e5e0eb3233b4beea59
commit: 93cf46e56e4b898a98c156e5e0eb3233b4beea59 [4/4] ARM: enable THREAD_INFO_IN_TASK
config: arm-shmobile_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/ardb/linux.git/commit/?id=93cf46e56e4b898a98c156e5e0eb3233b4beea59
        git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
        git fetch --no-tags ardb arm32-ti-in-task-v4
        git checkout 93cf46e56e4b898a98c156e5e0eb3233b4beea59
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/core.c:20:
   arch/arm/include/asm/switch_to.h: In function '__update_ti_cpu':
>> arch/arm/include/asm/switch_to.h:37:56: warning: passing argument 1 of 'task_thread_info' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      37 |         task_thread_info(next)->cpu = task_thread_info(prev)->cpu;
         |                                                        ^~~~
   In file included from include/linux/kthread.h:6,
                    from include/trace/events/sched.h:8,
                    from kernel/sched/core.c:10:
   include/linux/sched.h:1888:72: note: expected 'struct task_struct *' but argument is of type 'const struct task_struct *'
    1888 | static inline struct thread_info *task_thread_info(struct task_struct *task)
         |                                                    ~~~~~~~~~~~~~~~~~~~~^~~~
   kernel/sched/core.c: At top level:
   kernel/sched/core.c:3416:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
    3416 | void sched_set_stop_task(int cpu, struct task_struct *stop)
         |      ^~~~~~~~~~~~~~~~~~~


vim +37 arch/arm/include/asm/switch_to.h

    25	
    26	static inline void __update_ti_cpu(const struct task_struct *prev, struct task_struct *next)
    27	{
    28		if (!IS_ENABLED(CONFIG_THREAD_INFO_IN_TASK))
    29			return;
    30	
    31		/*
    32		 * The core code no longer maintains the thread_info::cpu field once
    33		 * CONFIG_THREAD_INFO_IN_TASK is in effect, but we rely on it for
    34		 * raw_smp_processor_id(), which cannot access struct task_struct*
    35		 * directly for reasons of circular #inclusion hell.
    36		 */
  > 37		task_thread_info(next)->cpu = task_thread_info(prev)->cpu;
    38	}
    39	

---
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: 33500 bytes --]

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

only message in thread, other threads:[~2021-09-12 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 19:45 [ardb:arm32-ti-in-task-v4 4/4] arch/arm/include/asm/switch_to.h:37:56: warning: passing argument 1 of 'task_thread_info' 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;
as well as URLs for NNTP newsgroup(s).