From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [dhowells-fs:netfs-crypt 30/37] fs/netfs/misc.c:19:2: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations
Date: Tue, 3 Sep 2024 21:42:03 +0800 [thread overview]
Message-ID: <202409032102.xgZmaBlx-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-crypt
head: 3962f4beba4e7ffa6cfab018df8a612902a1d2c8
commit: d1be8ca79490c7d6d61fa36a6f05537ecc1f2edb [30/37] netfs: Add bounce buffering support
config: i386-buildonly-randconfig-003-20240903 (https://download.01.org/0day-ci/archive/20240903/202409032102.xgZmaBlx-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240903/202409032102.xgZmaBlx-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/202409032102.xgZmaBlx-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/netfs/misc.c:19:2: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
19 | mempool_free(folio, &netfs_folio_pool);
| ^
>> fs/netfs/misc.c:61:11: error: call to undeclared function 'mempool_alloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
61 | folio = mempool_alloc(&netfs_folio_pool, gfp);
| ^
>> fs/netfs/misc.c:61:9: error: incompatible integer to pointer conversion assigning to 'struct folio *' from 'int' [-Wint-conversion]
61 | folio = mempool_alloc(&netfs_folio_pool, gfp);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
vim +/mempool_free +19 fs/netfs/misc.c
11
12 /*
13 * Discard our reference on the folio, returning it to the memory pool if we
14 * hold the last ref on it. The filesystem may have used MSG_SPLICE_PAGES on
15 * it and so it may have extra refs still.
16 */
17 void netfs_mempool_folio_put(struct folio *folio)
18 {
> 19 mempool_free(folio, &netfs_folio_pool);
20 }
21
22 /*
23 * Reset the subrequest iterator to refer just to the region remaining to be
24 * read. The iterator may or may not have been advanced by socket ops or
25 * extraction ops to an extent that may or may not match the amount actually
26 * read.
27 */
28 void netfs_reset_iter(struct netfs_io_subrequest *subreq)
29 {
30 struct iov_iter *io_iter = &subreq->io_iter;
31 size_t remain = subreq->len - subreq->transferred;
32
33 if (io_iter->count > remain)
34 iov_iter_advance(io_iter, io_iter->count - remain);
35 else if (io_iter->count < remain)
36 iov_iter_revert(io_iter, remain - io_iter->count);
37 iov_iter_truncate(&subreq->io_iter, remain);
38 }
39
40
41 /*
42 * Create the specified folio in the specified buffer attached to the request.
43 * The folios are marked with NETFS_BUF_PUT_MARK so that we know that these
44 * need freeing later.
45 *
46 * We set the index on the folio so that we can keep track of gaps in the
47 * buffer for when we're cleaning it up.
48 */
49 struct folio *netfs_add_folio_to_buffer(struct rolling_buffer *roll,
50 pgoff_t index, gfp_t gfp)
51 {
52 struct folio *folio;
53
54 for (;;) {
55 if (rolling_buffer_make_space(roll) == 0)
56 break;
57 msleep(10);
58 }
59
60 for (;;) {
> 61 folio = mempool_alloc(&netfs_folio_pool, gfp);
62 if (folio)
63 break;
64 msleep(10);
65 }
66
67 folio->index = index;
68 rolling_buffer_append(roll, folio, NETFS_FLAG_PUT_MARK);
69 return folio;
70 }
71
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-09-03 13:42 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=202409032102.xgZmaBlx-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox