All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: kernel test robot <lkp@intel.com>, oe-kbuild-all@lists.linux.dev
Subject: Re: [linux-next:master 3610/5236] io_uring/io_uring.h:229:27: error: implicit declaration of function 'io_cache_alloc'; did you mean 'kmem_cache_alloc'?
Date: Mon, 30 Dec 2024 17:13:45 -0700	[thread overview]
Message-ID: <7857f4bd-b200-46e9-b0fd-df9b862ca928@kernel.dk> (raw)
In-Reply-To: <87o70s7ovp.fsf@mailhost.krisman.be>

On 12/30/24 4:05 PM, Gabriel Krisman Bertazi wrote:
> Jens Axboe <axboe@kernel.dk> writes:
> 
>> On 12/26/24 6:13 AM, kernel test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head:   8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
>>> commit: 694022b01368387cc1ed8485e279dfe27939ee43 [3610/5236] io_uring: Add generic helper to allocate async data
>>> config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20241226/202412262106.bjOOaZcE-lkp@intel.com/config)
>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241226/202412262106.bjOOaZcE-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/202412262106.bjOOaZcE-lkp@intel.com/
>>>
>>> Note: the linux-next/master HEAD 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2 builds fine.
>>>       It may have been fixed somewhere.
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    In file included from io_uring/io_uring.c:82:
>>>    io_uring/io_uring.h: In function 'io_uring_alloc_async_data':
>>>>> io_uring/io_uring.h:229:27: error: implicit declaration of function
>>>>> 'io_cache_alloc'; did you mean 'kmem_cache_alloc'?
>>>>> [-Werror=implicit-function-declaration]
>>>      229 |         req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>          |                           ^~~~~~~~~~~~~~
>>>          |                           kmem_cache_alloc
>>>    io_uring/io_uring.h:229:25: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>>>      229 |         req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>          |                         ^
>>>    In file included from io_uring/io_uring.c:104:
>>>    io_uring/alloc_cache.h: At top level:
>>>>> io_uring/alloc_cache.h:33:21: error: conflicting types for
>>>>> 'io_cache_alloc'; have 'void *(struct io_alloc_cache *, gfp_t, void
>>>>> (*)(void *))' {aka 'void *(struct io_alloc_cache *, unsigned int,
>>>>> void (*)(void *))'}
>>>       33 | static inline void *io_cache_alloc(struct io_alloc_cache *cache, gfp_t gfp,
>>>          |                     ^~~~~~~~~~~~~~
>>>    io_uring/io_uring.h:229:27: note: previous implicit declaration of 'io_cache_alloc' with type 'int()'
>>>      229 |         req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>          |                           ^~~~~~~~~~~~~~
>>>    cc1: some warnings being treated as errors
>>> --
>>>    In file included from io_uring/opdef.c:11:
>>>    io_uring/io_uring.h: In function 'io_uring_alloc_async_data':
>>>>> io_uring/io_uring.h:229:27: error: implicit declaration of function
>>>>> 'io_cache_alloc'; did you mean 'kmem_cache_alloc'?
>>>>> [-Werror=implicit-function-declaration]
>>>      229 |         req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>          |                           ^~~~~~~~~~~~~~
>>>          |                           kmem_cache_alloc
>>>    io_uring/io_uring.h:229:25: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>>>      229 |         req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>          |                         ^
>>>    cc1: some warnings being treated as errors
>>>
>>>
>>> vim +229 io_uring/io_uring.h
>>>
>>>    224	
>>>    225	static inline void *io_uring_alloc_async_data(struct io_alloc_cache *cache,
>>>    226						      struct io_kiocb *req,
>>>    227						      void (*init_once)(void *obj))
>>>    228	{
>>>  > 229		req->async_data = io_cache_alloc(cache, GFP_KERNEL, init_once);
>>>    230		if (req->async_data)
>>>    231			req->flags |= REQ_F_ASYNC_DATA;
>>>    232		return req->async_data;
>>>    233	}
>>>    234	
>>
>> Gabriel, you add the alloc_cache.h include 3 patches too late, so biection
>> breaks for the series after this identified commit.
> 
> This is nasty.  What's the best course of action?  Do you want to drop
> the series since it is still in your branch and I can resend with this
> fixed?  Or is it too late since it made into -next?  Sorry for this and
> the other issue. This series was actually less harmless than I expected
> and even though I always do a last minute 'git rebase --exec make'
> before sending, I clearly failed to do it here.

Since it's still a ways off from the merge window, I just rebased from
the offending patch and to the top. So it's all sorted out.

-- 
Jens Axboe

      reply	other threads:[~2024-12-31  0:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 13:13 [linux-next:master 3610/5236] io_uring/io_uring.h:229:27: error: implicit declaration of function 'io_cache_alloc'; did you mean 'kmem_cache_alloc'? kernel test robot
2024-12-27 17:10 ` Jens Axboe
2024-12-30 23:05   ` Gabriel Krisman Bertazi
2024-12-31  0:13     ` Jens Axboe [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=7857f4bd-b200-46e9-b0fd-df9b862ca928@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=krisman@suse.de \
    --cc=lkp@intel.com \
    --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.