* [dhowells-fs:netfs-next 7/25] fs/netfs/bvecq.c:71:6: warning: assignment to 'struct bvecq *' from 'int' makes pointer from integer without a cast
@ 2026-08-04 4:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-04 4:32 UTC (permalink / raw)
To: David Howells; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-next
head: aaa4a525c627a60047b4d6b0d90ae8ea6a4bbdd4
commit: 2839f517bfb007fbfccafb1e6ac2b7d858e72fb4 [7/25] netfs: Make mempool available for bvecq
config: csky-randconfig-001-20260804 (https://download.01.org/0day-ci/archive/20260804/202608041257.gq0v52fy-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/202608041257.gq0v52fy-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/202608041257.gq0v52fy-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/netfs/bvecq.c: In function 'bvecq_alloc_one':
fs/netfs/bvecq.c:67:24: error: invalid use of incomplete typedef 'mempool_t' {aka 'struct mempool'}
67 | bq = netfs_bvecq_pool.alloc(gfp, netfs_bvecq_pool.pool_data);
| ^
fs/netfs/bvecq.c:67:52: error: invalid use of incomplete typedef 'mempool_t' {aka 'struct mempool'}
67 | bq = netfs_bvecq_pool.alloc(gfp, netfs_bvecq_pool.pool_data);
| ^
fs/netfs/bvecq.c:71:8: error: implicit declaration of function 'mempool_alloc'; did you mean 'mm_alloc'? [-Werror=implicit-function-declaration]
71 | bq = mempool_alloc(&netfs_bvecq_pool, gfp);
| ^~~~~~~~~~~~~
| mm_alloc
>> fs/netfs/bvecq.c:71:6: warning: assignment to 'struct bvecq *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
71 | bq = mempool_alloc(&netfs_bvecq_pool, gfp);
| ^
fs/netfs/bvecq.c: In function 'bvecq_put':
fs/netfs/bvecq.c:260:4: error: implicit declaration of function 'mempool_free' [-Werror=implicit-function-declaration]
260 | mempool_free(bq, &netfs_bvecq_pool);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +71 fs/netfs/bvecq.c
40
41 /**
42 * bvecq_alloc_one - Allocate a single bvecq node with unpopulated slots
43 * @nr_slots: Number of slots to allocate
44 * @gfp: The allocation constraints.
45 *
46 * Allocate a single bvecq node and initialise the header. A number of inline
47 * slots are also allocated, rounded up to fit after the header in a power-of-2
48 * slab object of up to 512 bytes (up to 29 slots on a 64-bit cpu). The caller
49 * should be aware that the number of slots allocated may be more or less than
50 * the number requested. The slot array is not initialised.
51 *
52 * Return: The node pointer or NULL on allocation failure.
53 */
54 struct bvecq *bvecq_alloc_one(size_t nr_slots, gfp_t gfp)
55 {
56 struct bvecq *bq;
57 const size_t max_size = 512;
58 const size_t max_slots = (max_size - sizeof(*bq)) / sizeof(bq->__bv[0]);
59 size_t part = umin(nr_slots, max_slots);
60 size_t size = roundup_pow_of_two(struct_size(bq, __bv, part));
61 bool from_pool = false;
62
63 gfp &= ~GFP_ZONEMASK;
64 if (size != BVECQ_STD_SIZE) {
65 bq = kmalloc(size, gfp);
66 } else {
67 bq = netfs_bvecq_pool.alloc(gfp, netfs_bvecq_pool.pool_data);
68 from_pool = true;
69 }
70 if (!bq && gfp != GFP_KERNEL) {
> 71 bq = mempool_alloc(&netfs_bvecq_pool, gfp);
72 from_pool = true;
73 size = BVECQ_STD_SIZE;
74 }
75 if (bq) {
76 *bq = (struct bvecq) {
77 .ref = REFCOUNT_INIT(1),
78 .bv = bq->__bv,
79 .inline_bv = true,
80 .max_slots = (size - sizeof(*bq)) / sizeof(bq->__bv[0]),
81 .from_pool = from_pool,
82 };
83 netfs_stat(&netfs_n_bvecq);
84 }
85 return bq;
86 }
87 EXPORT_SYMBOL(bvecq_alloc_one);
88
--
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-08-04 4:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 4:32 [dhowells-fs:netfs-next 7/25] fs/netfs/bvecq.c:71:6: warning: assignment to 'struct bvecq *' from 'int' makes pointer from integer without a cast kernel test robot
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.