All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Fomichev <a.fomichev@yadro.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-ntb@googlegroups.com, Jon Mason <jdmason@kudzu.us>,
	Dave Jiang <dave.jiang@intel.com>
Subject: [jonmason-ntb:ntb-perf-latency 2/5] drivers/ntb/test/ntb_perf.c:1185:14: error: call to undeclared function 'get_random_int'; ISO C99 and later do not support implicit function declarations
Date: Tue, 1 Oct 2024 09:22:11 +0800	[thread overview]
Message-ID: <202410010927.2eG6VtDI-lkp@intel.com> (raw)

tree:   https://github.com/jonmason/ntb ntb-perf-latency
head:   259175ed1ca5c7b82c8948657de24b15b99162d0
commit: 1361021161161af720f27081dc7cbda6e3c6f6d0 [2/5] ntb_perf: extend with poll latency measurement
config: arm-randconfig-003-20241001 (https://download.01.org/0day-ci/archive/20241001/202410010927.2eG6VtDI-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241001/202410010927.2eG6VtDI-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/oe-kbuild-all/202410010927.2eG6VtDI-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/ntb/test/ntb_perf.c:1185:14: error: call to undeclared function 'get_random_int'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1185 |                         *bp = (u8)get_random_int();
         |                                   ^
   1 error generated.


vim +/get_random_int +1185 drivers/ntb/test/ntb_perf.c

  1166	
  1167	static int perf_init_pl(struct perf_poll_lat_data *pldata)
  1168	{
  1169		struct perf_ctx *perf = pldata->perf;
  1170		struct perf_peer *peer = perf->test_peer;
  1171		u8 *bp;
  1172	
  1173		pldata->src = kmalloc_node(peer->outbuf_size, GFP_KERNEL,
  1174					 dev_to_node(&perf->ntb->dev));
  1175		if (!pldata->src)
  1176			return -ENOMEM;
  1177	
  1178		/*
  1179		 * Prepare random data to send, guaranteed exclusion of 0x00 (unreceived)
  1180		 * and 0xFF (stop_word)
  1181		 */
  1182		get_random_bytes(pldata->src, peer->outbuf_size);
  1183		for (bp = pldata->src; bp < (u8 *) pldata->src + peer->outbuf_size; bp++)
  1184			while (*bp == 0 || *bp == stop_word)
> 1185				*bp = (u8)get_random_int();
  1186	
  1187		memset(peer->inbuf, 0, peer->inbuf_size);
  1188	
  1189		return 0;
  1190	}
  1191	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-10-01  1:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202410010927.2eG6VtDI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.fomichev@yadro.com \
    --cc=dave.jiang@intel.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-ntb@googlegroups.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.