* [dhowells-fs:netfs-next-3 13/26] fs/netfs/bvecq.c:79:8: error: call to undeclared function 'mempool_alloc_noreserve'; ISO C99 and later do not support implicit function declarations
@ 2026-09-26 21:11 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-26 21:11 UTC (permalink / raw)
To: David Howells; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-next-3
head: 65d1ffcb408ea16b3a4a497269da871c62b7faa3
commit: 217cce19dbecd925c96842bf3b15c0b45e19a930 [13/26] netfs: Add some tools for managing bvecq chains
config: i386-randconfig-1013-20260926 (https://download.01.org/0day-ci/archive/20260927/202609270500.givpbBlA-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260927/202609270500.givpbBlA-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/202609270500.givpbBlA-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/netfs/bvecq.c:79:8: error: call to undeclared function 'mempool_alloc_noreserve'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
79 | bq = mempool_alloc_noreserve(&netfs_bvecq_pool, gfp);
| ^
fs/netfs/bvecq.c:79:6: error: incompatible integer to pointer conversion assigning to 'struct bvecq *' from 'int' [-Wint-conversion]
79 | bq = mempool_alloc_noreserve(&netfs_bvecq_pool, gfp);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/netfs/bvecq.c:277:4: error: call to undeclared function 'mempool_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
277 | mempool_free(bq, &netfs_bvecq_pool);
| ^
3 errors generated.
vim +/mempool_alloc_noreserve +79 fs/netfs/bvecq.c
38
39 /**
40 * bvecq_alloc_one - Allocate a single bvecq node with unpopulated slots
41 * @nr_slots: Number of slots to allocate
42 * @gfp: The allocation constraints.
43 * @for_writeback: True if allocating for writeback
44 *
45 * Allocate a single bvecq node and initialise the header. The allocation is
46 * rounded up to the size of the smallest slab granule that will accommodate it
47 * and all the remaining space is set as an inline slot array with max_slots
48 * set to the number of slots. The slot array is not initialised.
49 *
50 * If @for_writeback is set, then the emergency mempool may be used for
51 * allocation. If it does allocate from that pool, the maximum number of slots
52 * available will be BVECQ_POOL_SLOTS which may be less than requested. Also,
53 * if @for_writeback is set, the function will not fail - though it may have to
54 * wait.
55 *
56 * Return: The node pointer or NULL on allocation failure.
57 */
58 struct bvecq *bvecq_alloc_one(size_t nr_slots, gfp_t gfp, bool for_writeback)
59 {
60 struct bvecq *bq;
61 const size_t pool_size = struct_size_t(struct bvecq, __bv, BVECQ_POOL_SLOTS);
62 size_t size;
63 bool from_pool = false;
64
65 size = kmalloc_size_roundup(struct_size(bq, __bv, nr_slots));
66 gfp &= ~(GFP_ZONEMASK | __GFP_THISNODE);
67
68 if (for_writeback) {
69 if (size != pool_size) {
70 gfp_t gfp_temp = gfp;
71
72 gfp_temp |= __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN;
73 gfp_temp &= ~(__GFP_DIRECT_RECLAIM | __GFP_IO);
74 bq = kmalloc(size, gfp_temp);
75 if (bq)
76 goto success;
77 }
78
> 79 bq = mempool_alloc_noreserve(&netfs_bvecq_pool, gfp);
80 if (!bq)
81 return bq;
82 from_pool = true;
83 size = pool_size;
84 } else {
85 bq = kmalloc(size, gfp);
86 if (!bq)
87 return bq;
88 }
89
90 success:
91 *bq = (struct bvecq) {
92 .ref = REFCOUNT_INIT(1),
93 .bv = bq->__bv,
94 .inline_bv = true,
95 .max_slots = (size - sizeof(*bq)) / sizeof(bq->__bv[0]),
96 .from_pool = from_pool,
97 };
98 netfs_stat(&netfs_n_bvecq);
99 return bq;
100 }
101 EXPORT_SYMBOL(bvecq_alloc_one);
102
--
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:[~2026-09-26 21:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 21:11 [dhowells-fs:netfs-next-3 13/26] fs/netfs/bvecq.c:79:8: error: call to undeclared function 'mempool_alloc_noreserve'; ISO C99 and later do not support implicit function declarations kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox