From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)'
Date: Wed, 31 Mar 2021 14:15:41 +0800 [thread overview]
Message-ID: <202103311434.dpBaRaX7-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 18143 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e46d1b78a03d52306f21f77a4e4a144b6d31486
commit: 826bfeb37bb4302ee6042f330c4c0c757152bdb8 preempt/dynamic: Support dynamic preempt with preempt= boot option
date: 6 weeks ago
config: x86_64-randconfig-r011-20210331 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=826bfeb37bb4302ee6042f330c4c0c757152bdb8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 826bfeb37bb4302ee6042f330c4c0c757152bdb8
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
kernel/sched/core.c: In function 'schedule_tail':
kernel/sched/core.c:4252:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
4252 | struct rq *rq;
| ^~
In file included from include/linux/err.h:5,
from include/linux/kthread.h:5,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
kernel/sched/core.c: In function 'setup_preempt_mode':
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? \
| ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/tracepoint.h:22,
from include/trace/events/sched.h:10,
from kernel/sched/core.c:10:
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/static_call.h:118:39: note: in definition of macro 'static_call_update'
118 | STATIC_CALL_TRAMP_ADDR(name), func); \
| ^~~~
In file included from include/linux/err.h:5,
from include/linux/kthread.h:5,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? \
| ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
vim +5370 kernel/sched/core.c
5336
5337 /*
5338 * SC:cond_resched
5339 * SC:might_resched
5340 * SC:preempt_schedule
5341 * SC:preempt_schedule_notrace
5342 * SC:irqentry_exit_cond_resched
5343 *
5344 *
5345 * NONE:
5346 * cond_resched <- __cond_resched
5347 * might_resched <- RET0
5348 * preempt_schedule <- NOP
5349 * preempt_schedule_notrace <- NOP
5350 * irqentry_exit_cond_resched <- NOP
5351 *
5352 * VOLUNTARY:
5353 * cond_resched <- __cond_resched
5354 * might_resched <- __cond_resched
5355 * preempt_schedule <- NOP
5356 * preempt_schedule_notrace <- NOP
5357 * irqentry_exit_cond_resched <- NOP
5358 *
5359 * FULL:
5360 * cond_resched <- RET0
5361 * might_resched <- RET0
5362 * preempt_schedule <- preempt_schedule
5363 * preempt_schedule_notrace <- preempt_schedule_notrace
5364 * irqentry_exit_cond_resched <- irqentry_exit_cond_resched
5365 */
5366 static int __init setup_preempt_mode(char *str)
5367 {
5368 if (!strcmp(str, "none")) {
5369 static_call_update(cond_resched, __cond_resched);
> 5370 static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
5371 static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL);
5372 static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL);
5373 static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL);
5374 pr_info("Dynamic Preempt: %s\n", str);
5375 } else if (!strcmp(str, "voluntary")) {
5376 static_call_update(cond_resched, __cond_resched);
5377 static_call_update(might_resched, __cond_resched);
5378 static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL);
5379 static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL);
5380 static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL);
5381 pr_info("Dynamic Preempt: %s\n", str);
5382 } else if (!strcmp(str, "full")) {
5383 static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
5384 static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
5385 static_call_update(preempt_schedule, __preempt_schedule_func);
5386 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5387 static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched);
5388 pr_info("Dynamic Preempt: %s\n", str);
5389 } else {
5390 pr_warn("Dynamic Preempt: Unsupported preempt mode %s, default to full\n", str);
5391 return 1;
5392 }
5393 return 0;
5394 }
5395 __setup("preempt=", setup_preempt_mode);
5396
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36513 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>
Subject: kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)'
Date: Wed, 31 Mar 2021 14:15:41 +0800 [thread overview]
Message-ID: <202103311434.dpBaRaX7-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 17847 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e46d1b78a03d52306f21f77a4e4a144b6d31486
commit: 826bfeb37bb4302ee6042f330c4c0c757152bdb8 preempt/dynamic: Support dynamic preempt with preempt= boot option
date: 6 weeks ago
config: x86_64-randconfig-r011-20210331 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=826bfeb37bb4302ee6042f330c4c0c757152bdb8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 826bfeb37bb4302ee6042f330c4c0c757152bdb8
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
kernel/sched/core.c: In function 'schedule_tail':
kernel/sched/core.c:4252:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
4252 | struct rq *rq;
| ^~
In file included from include/linux/err.h:5,
from include/linux/kthread.h:5,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
kernel/sched/core.c: In function 'setup_preempt_mode':
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? \
| ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5370:3: note: in expansion of macro 'static_call_update'
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/tracepoint.h:22,
from include/trace/events/sched.h:10,
from kernel/sched/core.c:10:
>> kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5370 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/static_call.h:118:39: note: in definition of macro 'static_call_update'
118 | STATIC_CALL_TRAMP_ADDR(name), func); \
| ^~~~
In file included from include/linux/err.h:5,
from include/linux/kthread.h:5,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5383:36: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Wcast-function-type]
5383 | static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? \
| ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/linux/compiler_types.h:300:3: note: in expansion of macro 'if'
300 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:308:2: note: in expansion of macro '__compiletime_assert'
308 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
include/linux/static_call.h:116:2: note: in expansion of macro 'BUILD_BUG_ON'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~~
include/linux/static_call.h:116:16: note: in expansion of macro '__same_type'
116 | BUILD_BUG_ON(!__same_type(*(func), STATIC_CALL_TRAMP(name))); \
| ^~~~~~~~~~~
kernel/sched/core.c:5383:3: note: in expansion of macro 'static_call_update'
vim +5370 kernel/sched/core.c
5336
5337 /*
5338 * SC:cond_resched
5339 * SC:might_resched
5340 * SC:preempt_schedule
5341 * SC:preempt_schedule_notrace
5342 * SC:irqentry_exit_cond_resched
5343 *
5344 *
5345 * NONE:
5346 * cond_resched <- __cond_resched
5347 * might_resched <- RET0
5348 * preempt_schedule <- NOP
5349 * preempt_schedule_notrace <- NOP
5350 * irqentry_exit_cond_resched <- NOP
5351 *
5352 * VOLUNTARY:
5353 * cond_resched <- __cond_resched
5354 * might_resched <- __cond_resched
5355 * preempt_schedule <- NOP
5356 * preempt_schedule_notrace <- NOP
5357 * irqentry_exit_cond_resched <- NOP
5358 *
5359 * FULL:
5360 * cond_resched <- RET0
5361 * might_resched <- RET0
5362 * preempt_schedule <- preempt_schedule
5363 * preempt_schedule_notrace <- preempt_schedule_notrace
5364 * irqentry_exit_cond_resched <- irqentry_exit_cond_resched
5365 */
5366 static int __init setup_preempt_mode(char *str)
5367 {
5368 if (!strcmp(str, "none")) {
5369 static_call_update(cond_resched, __cond_resched);
> 5370 static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
5371 static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL);
5372 static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL);
5373 static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL);
5374 pr_info("Dynamic Preempt: %s\n", str);
5375 } else if (!strcmp(str, "voluntary")) {
5376 static_call_update(cond_resched, __cond_resched);
5377 static_call_update(might_resched, __cond_resched);
5378 static_call_update(preempt_schedule, (typeof(&preempt_schedule)) NULL);
5379 static_call_update(preempt_schedule_notrace, (typeof(&preempt_schedule_notrace)) NULL);
5380 static_call_update(irqentry_exit_cond_resched, (typeof(&irqentry_exit_cond_resched)) NULL);
5381 pr_info("Dynamic Preempt: %s\n", str);
5382 } else if (!strcmp(str, "full")) {
5383 static_call_update(cond_resched, (typeof(&__cond_resched)) __static_call_return0);
5384 static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0);
5385 static_call_update(preempt_schedule, __preempt_schedule_func);
5386 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5387 static_call_update(irqentry_exit_cond_resched, irqentry_exit_cond_resched);
5388 pr_info("Dynamic Preempt: %s\n", str);
5389 } else {
5390 pr_warn("Dynamic Preempt: Unsupported preempt mode %s, default to full\n", str);
5391 return 1;
5392 }
5393 return 0;
5394 }
5395 __setup("preempt=", setup_preempt_mode);
5396
---
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: 36513 bytes --]
next reply other threads:[~2021-03-31 6:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 6:15 kernel test robot [this message]
2021-03-31 6:15 ` kernel/sched/core.c:5370:37: warning: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' kernel test robot
2021-03-31 7:32 ` Peter Zijlstra
2021-03-31 7:32 ` Peter Zijlstra
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=202103311434.dpBaRaX7-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.