All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2024-10-01  1:22 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-01  1:22 UTC (permalink / raw)
  To: Alexander Fomichev; +Cc: llvm, oe-kbuild-all, linux-ntb, Jon Mason, Dave Jiang

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-01  1:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01  1:22 [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 kernel test robot

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.