[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201702101220.yVB40QyW%fengguang.wu@intel.com>
Date: Fri, 10 Feb 2017 13:01:00 +0800
From: kbuild test robot <lkp@...el.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Jason Baron <jbaron@...mai.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mel Gorman <mgorman@...e.de>, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] jump_label: mark __start/stop___jump_table const
Hi Michael,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc7 next-20170209]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/jump_label-mark-__start-stop___jump_table-const/20170210-104623
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
kernel/jump_label.c: In function 'jump_label_init':
>> kernel/jump_label.c:284:34: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
struct jump_entry *iter_start = __start___jump_table;
^~~~~~~~~~~~~~~~~~~~
kernel/jump_label.c:285:33: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
struct jump_entry *iter_stop = __stop___jump_table;
^~~~~~~~~~~~~~~~~~~
kernel/jump_label.c: In function 'jump_label_text_reserved':
>> kernel/jump_label.c:549:39: warning: passing argument 1 of '__jump_label_text_reserved' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
int ret = __jump_label_text_reserved(__start___jump_table,
^~~~~~~~~~~~~~~~~~~~
kernel/jump_label.c:210:12: note: expected 'struct jump_entry *' but argument is of type 'const struct jump_entry *'
static int __jump_label_text_reserved(struct jump_entry *iter_start,
^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/jump_label.c:550:4: warning: passing argument 2 of '__jump_label_text_reserved' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
__stop___jump_table, start, end);
^~~~~~~~~~~~~~~~~~~
kernel/jump_label.c:210:12: note: expected 'struct jump_entry *' but argument is of type 'const struct jump_entry *'
static int __jump_label_text_reserved(struct jump_entry *iter_start,
^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/jump_label.c: In function 'jump_label_update':
kernel/jump_label.c:563:28: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
struct jump_entry *stop = __stop___jump_table;
^~~~~~~~~~~~~~~~~~~
vim +/const +284 kernel/jump_label.c
706249c22 Peter Zijlstra 2015-07-24 268 struct jump_entry *entry,
706249c22 Peter Zijlstra 2015-07-24 269 struct jump_entry *stop)
706249c22 Peter Zijlstra 2015-07-24 270 {
706249c22 Peter Zijlstra 2015-07-24 271 for (; (entry < stop) && (jump_entry_key(entry) == key); entry++) {
706249c22 Peter Zijlstra 2015-07-24 272 /*
706249c22 Peter Zijlstra 2015-07-24 273 * entry->code set to 0 invalidates module init text sections
706249c22 Peter Zijlstra 2015-07-24 274 * kernel_text_address() verifies we are not in core kernel
706249c22 Peter Zijlstra 2015-07-24 275 * init code, see jump_label_invalidate_module_init().
706249c22 Peter Zijlstra 2015-07-24 276 */
706249c22 Peter Zijlstra 2015-07-24 277 if (entry->code && kernel_text_address(entry->code))
706249c22 Peter Zijlstra 2015-07-24 278 arch_jump_label_transform(entry, jump_label_type(entry));
706249c22 Peter Zijlstra 2015-07-24 279 }
706249c22 Peter Zijlstra 2015-07-24 280 }
706249c22 Peter Zijlstra 2015-07-24 281
97ce2c88f Jeremy Fitzhardinge 2011-10-12 282 void __init jump_label_init(void)
bf5438fca Jason Baron 2010-09-17 283 {
bf5438fca Jason Baron 2010-09-17 @284 struct jump_entry *iter_start = __start___jump_table;
bf5438fca Jason Baron 2010-09-17 285 struct jump_entry *iter_stop = __stop___jump_table;
c5905afb0 Ingo Molnar 2012-02-24 286 struct static_key *key = NULL;
bf5438fca Jason Baron 2010-09-17 287 struct jump_entry *iter;
bf5438fca Jason Baron 2010-09-17 288
1f69bf9c6 Jason Baron 2016-08-03 289 /*
1f69bf9c6 Jason Baron 2016-08-03 290 * Since we are initializing the static_key.enabled field with
1f69bf9c6 Jason Baron 2016-08-03 291 * with the 'raw' int values (to avoid pulling in atomic.h) in
1f69bf9c6 Jason Baron 2016-08-03 292 * jump_label.h, let's make sure that is safe. There are only two
:::::: The code at line 284 was first introduced by commit
:::::: bf5438fca2950b03c21ad868090cc1a8fcd49536 jump label: Base patch for jump label
:::::: TO: Jason Baron <jbaron@...hat.com>
:::::: CC: Steven Rostedt <rostedt@...dmis.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (38265 bytes)
Powered by blists - more mailing lists