public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>
Subject: [axboe-block:for-5.20/io_uring-zerocopy-send 23/23] io_uring/notif.c:52:23: error: implicit declaration of function 'io_alloc_req_refill'; did you mean 'io_rsrc_refs_refill'?
Date: Wed, 27 Jul 2022 12:31:18 +0800	[thread overview]
Message-ID: <202207271204.TWHjABcr-lkp@intel.com> (raw)

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: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220727/202207271204.TWHjABcr-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # 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
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/export.h:33,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:17,
                    from io_uring/notif.c:1:
   io_uring/notif.c: In function 'io_alloc_notif':
>> io_uring/notif.c:52:23: error: implicit declaration of function 'io_alloc_req_refill'; did you mean 'io_rsrc_refs_refill'? [-Werror=implicit-function-declaration]
      52 |         if (unlikely(!io_alloc_req_refill(ctx)))
         |                       ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
      78 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
>> io_uring/notif.c:54:17: error: implicit declaration of function 'io_alloc_req'; did you mean 'xa_alloc_irq'? [-Werror=implicit-function-declaration]
      54 |         notif = io_alloc_req(ctx);
         |                 ^~~~~~~~~~~~
         |                 xa_alloc_irq
>> io_uring/notif.c:54:15: warning: assignment to 'struct io_kiocb *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      54 |         notif = io_alloc_req(ctx);
         |               ^
   cc1: some warnings being treated as errors


vim +52 io_uring/notif.c

   > 1	#include <linux/kernel.h>
     2	#include <linux/errno.h>
     3	#include <linux/file.h>
     4	#include <linux/slab.h>
     5	#include <linux/net.h>
     6	#include <linux/io_uring.h>
     7	
     8	#include "io_uring.h"
     9	#include "notif.h"
    10	#include "rsrc.h"
    11	
    12	static void __io_notif_complete_tw(struct io_kiocb *notif, bool *locked)
    13	{
    14		struct io_notif_data *nd = io_notif_to_data(notif);
    15		struct io_ring_ctx *ctx = notif->ctx;
    16	
    17		if (nd->account_pages && ctx->user) {
    18			__io_unaccount_mem(ctx->user, nd->account_pages);
    19			nd->account_pages = 0;
    20		}
    21		io_req_task_complete(notif, locked);
    22	}
    23	
    24	static inline void io_notif_complete(struct io_kiocb *notif)
    25		__must_hold(&notif->ctx->uring_lock)
    26	{
    27		bool locked = true;
    28	
    29		__io_notif_complete_tw(notif, &locked);
    30	}
    31	
    32	static void io_uring_tx_zerocopy_callback(struct sk_buff *skb,
    33						  struct ubuf_info *uarg,
    34						  bool success)
    35	{
    36		struct io_notif_data *nd = container_of(uarg, struct io_notif_data, uarg);
    37		struct io_kiocb *notif = cmd_to_io_kiocb(nd);
    38	
    39		if (refcount_dec_and_test(&uarg->refcnt)) {
    40			notif->io_task_work.func = __io_notif_complete_tw;
    41			io_req_task_work_add(notif);
    42		}
    43	}
    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

             reply	other threads:[~2022-07-27  4:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  4:31 kernel test robot [this message]
2022-07-27  9:12 ` [axboe-block:for-5.20/io_uring-zerocopy-send 23/23] io_uring/notif.c:52:23: error: implicit declaration of function 'io_alloc_req_refill'; did you mean 'io_rsrc_refs_refill'? Pavel Begunkov

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=202207271204.TWHjABcr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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