Hi Yan, kernel test robot noticed the following build errors: [auto build test ERROR on shuah-kselftest/next] [also build test ERROR on shuah-kselftest/fixes linus/master v6.11-rc5 next-20240826] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Yan-Zhen/selftests-tdx-Use-min-macro/20240822-125041 base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next patch link: https://lore.kernel.org/r/20240822044630.1267500-1-yanzhen%40vivo.com patch subject: [PATCH v1] selftests:tdx:Use min macro :::::: branch date: 5 days ago :::::: commit date: 5 days ago compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/202408271330.HMq39DWo-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/r/202408271330.HMq39DWo-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> tdx_guest_test.c:121:14: error: call to undeclared function 'min'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 121 | line_len = min((len - j), rowsize); | ^ 1 error generated. vim +/min +121 tools/testing/selftests/tdx/tdx_guest_test.c 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 111 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 112 static void print_array_hex(const char *title, const char *prefix_str, 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 113 const void *buf, int len) 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 114 { 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 115 int i, j, line_len, rowsize = HEX_DUMP_SIZE; 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 116 const __u8 *ptr = buf; 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 117 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 118 printf("\t\t%s", title); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 119 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 120 for (j = 0; j < len; j += rowsize) { 712bf3fd186eaf Yan Zhen 2024-08-22 @121 line_len = min((len - j), rowsize); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 122 printf("%s%.8x:", prefix_str, j); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 123 for (i = 0; i < line_len; i++) 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 124 printf(" %.2x", ptr[j + i]); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 125 printf("\n"); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 126 } 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 127 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 128 printf("\n"); 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 129 } 00e07cfbdf0b23 Kuppuswamy Sathyanarayanan 2022-11-16 130 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki