tree:
https://git.linaro.org/people/vincent.guittot/kernel.git sched/pelt
head: cc807c0b8d03785da906a6a8436be5838bfe9d54
commit: a057128bc3087ebc9505454a1b5d7a4ae35c6e04 [1/2] sched/fair: handle case of
task_h_load() returning 0
config: ia64-randconfig-r035-20200710 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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
git checkout a057128bc3087ebc9505454a1b5d7a4ae35c6e04
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
kernel/sched/fair.c: In function 'update_misfit_status':
> include/linux/kernel.h:851:29: warning: comparison of distinct
pointer types lacks a cast
851 | (!!(sizeof((typeof(x) *)1 == (typeof(y)
*)1)))
| ^~
include/linux/kernel.h:865:4: note: in expansion of macro '__typecheck'
865 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/kernel.h:875:24: note: in expansion of macro '__safe_cmp'
875 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:891:19: note: in expansion of macro '__careful_cmp'
891 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/fair.c:4056:25: note: in expansion of macro 'max'
4056 | rq->misfit_task_load = max(task_h_load(p), 1);
| ^~~
kernel/sched/fair.c: In function 'detach_tasks':
> include/linux/kernel.h:851:29: warning: comparison of distinct
pointer types lacks a cast
851 | (!!(sizeof((typeof(x) *)1 == (typeof(y)
*)1)))
| ^~
include/linux/kernel.h:865:4: note: in expansion of macro '__typecheck'
865 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~
include/linux/kernel.h:875:24: note: in expansion of macro '__safe_cmp'
875 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:891:19: note: in expansion of macro '__careful_cmp'
891 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/fair.c:7662:11: note: in expansion of macro 'max'
7662 | load = max(task_h_load(p), 1);
| ^~~
vim +851 include/linux/kernel.h
526211bc58c4b32 Ingo Molnar 2009-03-05 837
^1da177e4c3f415 Linus Torvalds 2005-04-16 838 /*
3c8ba0d61d04ced Kees Cook 2018-03-30 839 * min()/max()/clamp() macros must
accomplish three things:
3c8ba0d61d04ced Kees Cook 2018-03-30 840 *
3c8ba0d61d04ced Kees Cook 2018-03-30 841 * - avoid multiple evaluations of the
arguments (so side-effects like
3c8ba0d61d04ced Kees Cook 2018-03-30 842 * "x++" happen only once)
when non-constant.
3c8ba0d61d04ced Kees Cook 2018-03-30 843 * - perform strict type-checking (to
generate warnings instead of
3c8ba0d61d04ced Kees Cook 2018-03-30 844 * nasty runtime surprises). See the
"unnecessary" pointer comparison
3c8ba0d61d04ced Kees Cook 2018-03-30 845 * in __typecheck().
3c8ba0d61d04ced Kees Cook 2018-03-30 846 * - retain result as a constant
expressions when called with only
3c8ba0d61d04ced Kees Cook 2018-03-30 847 * constant expressions (to avoid
tripping VLA warnings in stack
3c8ba0d61d04ced Kees Cook 2018-03-30 848 * allocation usage).
3c8ba0d61d04ced Kees Cook 2018-03-30 849 */
3c8ba0d61d04ced Kees Cook 2018-03-30 850 #define __typecheck(x, y) \
3c8ba0d61d04ced Kees Cook 2018-03-30 @851 (!!(sizeof((typeof(x) *)1 == (typeof(y)
*)1)))
3c8ba0d61d04ced Kees Cook 2018-03-30 852
:::::: The code at line 851 was first introduced by commit
:::::: 3c8ba0d61d04ced9f8d9ff93977995a9e4e96e91 kernel.h: Retain constant expression
output for max()/min()
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org