From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Keith Packard <keithpac@amazon.com>
Subject: [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
Date: Mon, 13 Sep 2021 03:45:23 +0800 [thread overview]
Message-ID: <202109130319.njugzpPR-lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2021-09-12 19:45 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=202109130319.njugzpPR-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=keithpac@amazon.com \
--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
Powered by JetHome