Hi Gwan-gyeong, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] url: https://github.com/intel-lab-lkp/linux/commits/Gwan-gyeong-Mun/Fixes-integer-overflow-or-integer-truncation-issues-in-page-lookups-ttm-place-configuration-and-scatterlist-creation/20220923-163015 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip config: hexagon-randconfig-r041-20220923 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920) 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://github.com/intel-lab-lkp/linux/commit/90f09a98b3949d759efe6febd174ed6e26c1a3ab git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Gwan-gyeong-Mun/Fixes-integer-overflow-or-integer-truncation-issues-in-page-lookups-ttm-place-configuration-and-scatterlist-creation/20220923-163015 git checkout 90f09a98b3949d759efe6febd174ed6e26c1a3ab # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash lib/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> lib/overflow_kunit.c:748:2: warning: result of comparison of constant 65535 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u8, u16, U8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:748:2: warning: result of comparison of constant 65535 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u8, u16, U8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:752:2: warning: result of comparison of constant 32767 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u8, s16, U8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:752:2: warning: result of comparison of constant 32767 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u8, s16, U8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:753:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:753:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:754:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:754:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:755:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, S8_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:755:2: warning: result of comparison of constant 255 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u8, S8_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:756:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:756:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:757:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:757:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:758:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, S8_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:758:2: warning: result of comparison of constant 65535 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, u16, S8_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:769:2: warning: result of comparison of constant 32767 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:769:2: warning: result of comparison of constant -32768 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:769:2: warning: result of comparison of constant 32767 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:769:2: warning: result of comparison of constant -32768 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:770:2: warning: result of comparison of constant 32767 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:770:2: warning: result of comparison of constant -32768 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:770:2: warning: result of comparison of constant 32767 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:770:2: warning: result of comparison of constant -32768 with expression of type 's8' (aka 'signed char') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s8, s16, S8_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:780:2: warning: result of comparison of constant 4294967295 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u16, u32, U16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:780:2: warning: result of comparison of constant 4294967295 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u16, u32, U16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:781:2: warning: result of comparison of constant 2147483647 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u16, s32, U16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:781:2: warning: result of comparison of constant 2147483647 with expression of type 'u16' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(u16, s32, U16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:216:5: note: expanded from macro 'overflows_type_ret_const_expr' x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:786:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ >> lib/overflow_kunit.c:786:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:787:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:787:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, -1, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:788:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, S16_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:788:2: warning: result of comparison of constant 65535 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, u16, S16_MIN, true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:218:14: note: expanded from macro 'overflows_type_ret_const_expr' x < 0 || x > type_max(typeof(T)) ? 1 : 0 \ ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:805:2: warning: result of comparison of constant 2147483647 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:805:2: warning: result of comparison of constant -2147483648 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:805:2: warning: result of comparison of constant 2147483647 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:805:2: warning: result of comparison of constant -2147483648 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MAX, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:739:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, __t2) ? true : false;\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:806:2: warning: result of comparison of constant 2147483647 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:34: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:806:2: warning: result of comparison of constant -2147483648 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MIN, false); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:733:9: note: expanded from macro 'TEST_OVERFLOWS_TYPE' __of = overflows_type_ret_const_expr(__t1, t2) ? true : false; \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/overflow.h:219:7: note: expanded from macro 'overflows_type_ret_const_expr' : x < type_min(typeof(T)) || x > type_max(typeof(T)) ? 1 : 0 ) ~ ^ ~~~~~~~~~~~~~~~~~~~ lib/overflow_kunit.c:806:2: warning: result of comparison of constant 2147483647 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] TEST_OVERFLOWS_TYPE(s16, s32, S16_MIN, false); vim +748 lib/overflow_kunit.c 746 747 TEST_OVERFLOWS_TYPE(u8, u8, U8_MAX, false); > 748 TEST_OVERFLOWS_TYPE(u8, u16, U8_MAX, false); 749 TEST_OVERFLOWS_TYPE(u8, s8, U8_MAX, true); 750 TEST_OVERFLOWS_TYPE(u8, s8, S8_MAX, false); 751 TEST_OVERFLOWS_TYPE(u8, s8, (u8)S8_MAX + 1, true); 752 TEST_OVERFLOWS_TYPE(u8, s16, U8_MAX, false); > 753 TEST_OVERFLOWS_TYPE(s8, u8, S8_MAX, false); 754 TEST_OVERFLOWS_TYPE(s8, u8, -1, true); 755 TEST_OVERFLOWS_TYPE(s8, u8, S8_MIN, true); 756 TEST_OVERFLOWS_TYPE(s8, u16, S8_MAX, false); 757 TEST_OVERFLOWS_TYPE(s8, u16, -1, true); 758 TEST_OVERFLOWS_TYPE(s8, u16, S8_MIN, true); 759 TEST_OVERFLOWS_TYPE(s8, u32, S8_MAX, false); 760 TEST_OVERFLOWS_TYPE(s8, u32, -1, true); 761 TEST_OVERFLOWS_TYPE(s8, u32, S8_MIN, true); 762 #if BITS_PER_LONG == 64 763 TEST_OVERFLOWS_TYPE(s8, u64, S8_MAX, false); 764 TEST_OVERFLOWS_TYPE(s8, u64, -1, true); 765 TEST_OVERFLOWS_TYPE(s8, u64, S8_MIN, true); 766 #endif 767 TEST_OVERFLOWS_TYPE(s8, s8, S8_MAX, false); 768 TEST_OVERFLOWS_TYPE(s8, s8, S8_MIN, false); 769 TEST_OVERFLOWS_TYPE(s8, s16, S8_MAX, false); 770 TEST_OVERFLOWS_TYPE(s8, s16, S8_MIN, false); 771 TEST_OVERFLOWS_TYPE(u16, u8, U8_MAX, false); 772 TEST_OVERFLOWS_TYPE(u16, u8, (u16)U8_MAX + 1, true); 773 TEST_OVERFLOWS_TYPE(u16, u8, U16_MAX, true); 774 TEST_OVERFLOWS_TYPE(u16, s8, S8_MAX, false); 775 TEST_OVERFLOWS_TYPE(u16, s8, (u16)S8_MAX + 1, true); 776 TEST_OVERFLOWS_TYPE(u16, s8, U16_MAX, true); 777 TEST_OVERFLOWS_TYPE(u16, s16, S16_MAX, false); 778 TEST_OVERFLOWS_TYPE(u16, s16, (u16)S16_MAX + 1, true); 779 TEST_OVERFLOWS_TYPE(u16, s16, U16_MAX, true); > 780 TEST_OVERFLOWS_TYPE(u16, u32, U16_MAX, false); 781 TEST_OVERFLOWS_TYPE(u16, s32, U16_MAX, false); 782 TEST_OVERFLOWS_TYPE(s16, u8, U8_MAX, false); 783 TEST_OVERFLOWS_TYPE(s16, u8, (s16)U8_MAX + 1, true); 784 TEST_OVERFLOWS_TYPE(s16, u8, -1, true); 785 TEST_OVERFLOWS_TYPE(s16, u8, S16_MIN, true); > 786 TEST_OVERFLOWS_TYPE(s16, u16, S16_MAX, false); 787 TEST_OVERFLOWS_TYPE(s16, u16, -1, true); 788 TEST_OVERFLOWS_TYPE(s16, u16, S16_MIN, true); 789 TEST_OVERFLOWS_TYPE(s16, u32, S16_MAX, false); 790 TEST_OVERFLOWS_TYPE(s16, u32, -1, true); 791 TEST_OVERFLOWS_TYPE(s16, u32, S16_MIN, true); 792 #if BITS_PER_LONG == 64 793 TEST_OVERFLOWS_TYPE(s16, u64, S16_MAX, false); 794 TEST_OVERFLOWS_TYPE(s16, u64, -1, true); 795 TEST_OVERFLOWS_TYPE(s16, u64, S16_MIN, true); 796 #endif 797 TEST_OVERFLOWS_TYPE(s16, s8, S8_MAX, false); 798 TEST_OVERFLOWS_TYPE(s16, s8, S8_MIN, false); 799 TEST_OVERFLOWS_TYPE(s16, s8, (s16)S8_MAX + 1, true); 800 TEST_OVERFLOWS_TYPE(s16, s8, (s16)S8_MIN - 1, true); 801 TEST_OVERFLOWS_TYPE(s16, s8, S16_MAX, true); 802 TEST_OVERFLOWS_TYPE(s16, s8, S16_MIN, true); 803 TEST_OVERFLOWS_TYPE(s16, s16, S16_MAX, false); 804 TEST_OVERFLOWS_TYPE(s16, s16, S16_MIN, false); 805 TEST_OVERFLOWS_TYPE(s16, s32, S16_MAX, false); 806 TEST_OVERFLOWS_TYPE(s16, s32, S16_MIN, false); 807 TEST_OVERFLOWS_TYPE(u32, u8, U8_MAX, false); 808 TEST_OVERFLOWS_TYPE(u32, u8, (u32)U8_MAX + 1, true); 809 TEST_OVERFLOWS_TYPE(u32, u8, U32_MAX, true); 810 TEST_OVERFLOWS_TYPE(u32, s8, S8_MAX, false); 811 TEST_OVERFLOWS_TYPE(u32, s8, (u32)S8_MAX + 1, true); 812 TEST_OVERFLOWS_TYPE(u32, s8, U32_MAX, true); 813 TEST_OVERFLOWS_TYPE(u32, u16, U16_MAX, false); 814 TEST_OVERFLOWS_TYPE(u32, u16, U16_MAX + 1, true); 815 TEST_OVERFLOWS_TYPE(u32, u16, U32_MAX, true); 816 TEST_OVERFLOWS_TYPE(u32, s16, S16_MAX, false); 817 TEST_OVERFLOWS_TYPE(u32, s16, (u32)S16_MAX + 1, true); 818 TEST_OVERFLOWS_TYPE(u32, s16, U32_MAX, true); 819 TEST_OVERFLOWS_TYPE(u32, u32, U32_MAX, false); 820 TEST_OVERFLOWS_TYPE(u32, s32, S32_MAX, false); 821 TEST_OVERFLOWS_TYPE(u32, s32, U32_MAX, true); 822 TEST_OVERFLOWS_TYPE(u32, s32, (u32)S32_MAX + 1, true); 823 #if BITS_PER_LONG == 64 824 TEST_OVERFLOWS_TYPE(u32, u64, U32_MAX, false); 825 TEST_OVERFLOWS_TYPE(u32, s64, U32_MAX, false); 826 #endif 827 TEST_OVERFLOWS_TYPE(s32, u8, U8_MAX, false); 828 TEST_OVERFLOWS_TYPE(s32, u8, (s32)U8_MAX + 1, true); 829 TEST_OVERFLOWS_TYPE(s32, u16, S32_MAX, true); 830 TEST_OVERFLOWS_TYPE(s32, u8, -1, true); 831 TEST_OVERFLOWS_TYPE(s32, u8, S32_MIN, true); 832 TEST_OVERFLOWS_TYPE(s32, u16, U16_MAX, false); 833 TEST_OVERFLOWS_TYPE(s32, u16, (s32)U16_MAX + 1, true); 834 TEST_OVERFLOWS_TYPE(s32, u16, S32_MAX, true); 835 TEST_OVERFLOWS_TYPE(s32, u16, -1, true); 836 TEST_OVERFLOWS_TYPE(s32, u16, S32_MIN, true); 837 TEST_OVERFLOWS_TYPE(s32, u32, S32_MAX, false); 838 TEST_OVERFLOWS_TYPE(s32, u32, -1, true); 839 TEST_OVERFLOWS_TYPE(s32, u32, S32_MIN, true); 840 #if BITS_PER_LONG == 64 841 TEST_OVERFLOWS_TYPE(s32, u64, S32_MAX, false); 842 TEST_OVERFLOWS_TYPE(s32, u64, -1, true); 843 TEST_OVERFLOWS_TYPE(s32, u64, S32_MIN, true); 844 #endif 845 TEST_OVERFLOWS_TYPE(s32, s8, S8_MAX, false); 846 TEST_OVERFLOWS_TYPE(s32, s8, S8_MIN, false); 847 TEST_OVERFLOWS_TYPE(s32, s8, (s32)S8_MAX + 1, true); 848 TEST_OVERFLOWS_TYPE(s32, s8, (s32)S8_MIN - 1, true); 849 TEST_OVERFLOWS_TYPE(s32, s8, S32_MAX, true); 850 TEST_OVERFLOWS_TYPE(s32, s8, S32_MIN, true); 851 TEST_OVERFLOWS_TYPE(s32, s16, S16_MAX, false); 852 TEST_OVERFLOWS_TYPE(s32, s16, S16_MIN, false); 853 TEST_OVERFLOWS_TYPE(s32, s16, (s32)S16_MAX + 1, true); 854 TEST_OVERFLOWS_TYPE(s32, s16, (s32)S16_MIN - 1, true); 855 TEST_OVERFLOWS_TYPE(s32, s16, S32_MAX, true); 856 TEST_OVERFLOWS_TYPE(s32, s16, S32_MIN, true); 857 TEST_OVERFLOWS_TYPE(s32, s32, S32_MAX, false); 858 TEST_OVERFLOWS_TYPE(s32, s32, S32_MIN, false); 859 #if BITS_PER_LONG == 64 860 TEST_OVERFLOWS_TYPE(s32, s64, S32_MAX, false); 861 TEST_OVERFLOWS_TYPE(s32, s64, S32_MIN, false); 862 TEST_OVERFLOWS_TYPE(u64, u8, U64_MAX, true); 863 TEST_OVERFLOWS_TYPE(u64, u8, U8_MAX, false); 864 TEST_OVERFLOWS_TYPE(u64, u8, (u64)U8_MAX + 1, true); 865 TEST_OVERFLOWS_TYPE(u64, u16, U64_MAX, true); 866 TEST_OVERFLOWS_TYPE(u64, u16, U16_MAX, false); 867 TEST_OVERFLOWS_TYPE(u64, u16, (u64)U16_MAX + 1, true); 868 TEST_OVERFLOWS_TYPE(u64, u32, U64_MAX, true); 869 TEST_OVERFLOWS_TYPE(u64, u32, U32_MAX, false); 870 TEST_OVERFLOWS_TYPE(u64, u32, (u64)U32_MAX + 1, true); 871 TEST_OVERFLOWS_TYPE(u64, u64, U64_MAX, false); 872 TEST_OVERFLOWS_TYPE(u64, s8, S8_MAX, false); 873 TEST_OVERFLOWS_TYPE(u64, s8, (u64)S8_MAX + 1, true); 874 TEST_OVERFLOWS_TYPE(u64, s8, U64_MAX, true); 875 TEST_OVERFLOWS_TYPE(u64, s16, S16_MAX, false); 876 TEST_OVERFLOWS_TYPE(u64, s16, (u64)S16_MAX + 1, true); 877 TEST_OVERFLOWS_TYPE(u64, s16, U64_MAX, true); 878 TEST_OVERFLOWS_TYPE(u64, s32, S32_MAX, false); 879 TEST_OVERFLOWS_TYPE(u64, s32, (u64)S32_MAX + 1, true); 880 TEST_OVERFLOWS_TYPE(u64, s32, U64_MAX, true); 881 TEST_OVERFLOWS_TYPE(u64, s64, S64_MAX, false); 882 TEST_OVERFLOWS_TYPE(u64, s64, U64_MAX, true); 883 TEST_OVERFLOWS_TYPE(u64, s64, (u64)S64_MAX + 1, true); 884 TEST_OVERFLOWS_TYPE(s64, u8, S64_MAX, true); 885 TEST_OVERFLOWS_TYPE(s64, u8, S64_MIN, true); 886 TEST_OVERFLOWS_TYPE(s64, u8, -1, true); 887 TEST_OVERFLOWS_TYPE(s64, u8, U8_MAX, false); 888 TEST_OVERFLOWS_TYPE(s64, u8, (s64)U8_MAX + 1, true); 889 TEST_OVERFLOWS_TYPE(s64, u16, S64_MAX, true); 890 TEST_OVERFLOWS_TYPE(s64, u16, S64_MIN, true); 891 TEST_OVERFLOWS_TYPE(s64, u16, -1, true); 892 TEST_OVERFLOWS_TYPE(s64, u16, U16_MAX, false); 893 TEST_OVERFLOWS_TYPE(s64, u16, (s64)U16_MAX + 1, true); 894 TEST_OVERFLOWS_TYPE(s64, u32, S64_MAX, true); 895 TEST_OVERFLOWS_TYPE(s64, u32, S64_MIN, true); 896 TEST_OVERFLOWS_TYPE(s64, u32, -1, true); 897 TEST_OVERFLOWS_TYPE(s64, u32, U32_MAX, false); 898 TEST_OVERFLOWS_TYPE(s64, u32, (s64)U32_MAX + 1, true); 899 TEST_OVERFLOWS_TYPE(s64, u64, S64_MAX, false); 900 TEST_OVERFLOWS_TYPE(s64, u64, S64_MIN, true); 901 TEST_OVERFLOWS_TYPE(s64, u64, -1, true); 902 TEST_OVERFLOWS_TYPE(s64, s8, S8_MAX, false); 903 TEST_OVERFLOWS_TYPE(s64, s8, S8_MIN, false); 904 TEST_OVERFLOWS_TYPE(s64, s8, (s64)S8_MAX + 1, true); 905 TEST_OVERFLOWS_TYPE(s64, s8, (s64)S8_MIN - 1, true); 906 TEST_OVERFLOWS_TYPE(s64, s8, S64_MAX, true); 907 TEST_OVERFLOWS_TYPE(s64, s16, S16_MAX, false); 908 TEST_OVERFLOWS_TYPE(s64, s16, S16_MIN, false); 909 TEST_OVERFLOWS_TYPE(s64, s16, (s64)S16_MAX + 1, true); 910 TEST_OVERFLOWS_TYPE(s64, s16, (s64)S16_MIN - 1, true); 911 TEST_OVERFLOWS_TYPE(s64, s16, S64_MAX, true); 912 TEST_OVERFLOWS_TYPE(s64, s32, S32_MAX, false); 913 TEST_OVERFLOWS_TYPE(s64, s32, S32_MIN, false); 914 TEST_OVERFLOWS_TYPE(s64, s32, (s64)S32_MAX + 1, true); 915 TEST_OVERFLOWS_TYPE(s64, s32, (s64)S32_MIN - 1, true); 916 TEST_OVERFLOWS_TYPE(s64, s32, S64_MAX, true); 917 TEST_OVERFLOWS_TYPE(s64, s64, S64_MAX, false); 918 TEST_OVERFLOWS_TYPE(s64, s64, S64_MIN, false); 919 #endif 920 #undef TEST_OVERFLOWS_TYPE 921 } 922 -- 0-DAY CI Kernel Test Service https://01.org/lkp