[axboe-block:for-5.20/io_uring-zerocopy-send 23/23] io_uring/notif.c:52:16: error: call to undeclared function 'io_alloc_req_refill'; ISO C99 and later do not support implicit function declarations

From: kernel test robot
Date: Tue Jul 26 2022 - 22:46:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.20/io_uring-zerocopy-send
head: fbe6f6bc3210e853aab74f20da776c15c5b052fe
commit: fbe6f6bc3210e853aab74f20da776c15c5b052fe [23/23] io_uring/zc: notification completion optimisation
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220727/202207271019.xPvKdqmJ-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 83882606dbd7ffb0bdd3460356202d97705809c8)
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://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=fbe6f6bc3210e853aab74f20da776c15c5b052fe
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block for-5.20/io_uring-zerocopy-send
git checkout fbe6f6bc3210e853aab74f20da776c15c5b052fe
# 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=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> io_uring/notif.c:52:16: error: call to undeclared function 'io_alloc_req_refill'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (unlikely(!io_alloc_req_refill(ctx)))
^
io_uring/notif.c:52:16: note: did you mean 'io_rsrc_refs_refill'?
io_uring/rsrc.h:57:6: note: 'io_rsrc_refs_refill' declared here
void io_rsrc_refs_refill(struct io_ring_ctx *ctx);
^
>> io_uring/notif.c:54:10: error: call to undeclared function 'io_alloc_req'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
notif = io_alloc_req(ctx);
^
io_uring/notif.c:54:10: note: did you mean 'xa_alloc_irq'?
include/linux/xarray.h:913:32: note: 'xa_alloc_irq' declared here
static inline int __must_check xa_alloc_irq(struct xarray *xa, u32 *id,
^
>> io_uring/notif.c:54:8: error: incompatible integer to pointer conversion assigning to 'struct io_kiocb *' from 'int' [-Wint-conversion]
notif = io_alloc_req(ctx);
^ ~~~~~~~~~~~~~~~~~
3 errors generated.


vim +/io_alloc_req_refill +52 io_uring/notif.c

44
45 struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx,
46 struct io_notif_slot *slot)
47 __must_hold(&ctx->uring_lock)
48 {
49 struct io_kiocb *notif;
50 struct io_notif_data *nd;
51
> 52 if (unlikely(!io_alloc_req_refill(ctx)))
53 return NULL;
> 54 notif = io_alloc_req(ctx);
55 notif->opcode = IORING_OP_NOP;
56 notif->flags = 0;
57 notif->file = NULL;
58 notif->task = current;
59 io_get_task_refs(1);
60 notif->rsrc_node = NULL;
61 io_req_set_rsrc_node(notif, ctx, 0);
62 notif->cqe.user_data = slot->tag;
63 notif->cqe.flags = slot->seq++;
64 notif->cqe.res = 0;
65
66 nd = io_notif_to_data(notif);
67 nd->account_pages = 0;
68 nd->uarg.flags = SKBFL_ZEROCOPY_FRAG | SKBFL_DONT_ORPHAN;
69 nd->uarg.callback = io_uring_tx_zerocopy_callback;
70 /* master ref owned by io_notif_slot, will be dropped on flush */
71 refcount_set(&nd->uarg.refcnt, 1);
72 return notif;
73 }
74

--
0-DAY CI Kernel Test Service
https://01.org/lkp