Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yan Zhen <yanzhen@vivo.com>, <shuah@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<opensource.kernel@vivo.com>, Yan Zhen <yanzhen@vivo.com>
Subject: Re: [PATCH v1] selftests:tdx:Use min macro
Date: Tue, 27 Aug 2024 20:34:03 +0800	[thread overview]
Message-ID: <Zs3Hu6pBPWBEdiUF@rli9-mobl> (raw)
In-Reply-To: <20240822044630.1267500-1-yanzhen@vivo.com>

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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/r/202408271330.HMq39DWo-lkp@intel.com/

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


      parent reply	other threads:[~2024-08-27 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  4:46 [PATCH v1] selftests:tdx:Use min macro Yan Zhen
2024-08-22  6:35 ` Shuah Khan
2024-08-27 12:34 ` kernel test robot [this message]

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=Zs3Hu6pBPWBEdiUF@rli9-mobl \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=opensource.kernel@vivo.com \
    --cc=shuah@kernel.org \
    --cc=yanzhen@vivo.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox