Re: [PATCH net-next v2 05/13] virtio_ring: introduce add api for premapped
From: kernel test robot <hidden>
Date: 2024-10-31 02:19:51
Also in:
bpf, llvm, oe-kbuild-all, virtualization
Hi Xuan, kernel test robot noticed the following build warnings: [auto build test WARNING on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Xuan-Zhuo/virtio_ring-introduce-vring_need_unmap_buffer/20241030-162739 base: net-next/main patch link: https://lore.kernel.org/r/20241030082453.97310-6-xuanzhuo%40linux.alibaba.com patch subject: [PATCH net-next v2 05/13] virtio_ring: introduce add api for premapped config: x86_64-buildonly-randconfig-003-20241031 (https://download.01.org/0day-ci/archive/20241031/202410310925.LuCycrTj-lkp@intel.com/config) compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241031/202410310925.LuCycrTj-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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202410310925.LuCycrTj-lkp@intel.com/ (local) All warnings (new ones prefixed by >>):
quoted
drivers/virtio/virtio_ring.c:2293: warning: Function parameter or struct member 'premapped' not described in 'virtqueue_add_outbuf_premapped' drivers/virtio/virtio_ring.c:2364: warning: Function parameter or struct member 'premapped' not described in 'virtqueue_add_inbuf_premapped'
vim +2293 drivers/virtio/virtio_ring.c 2274 2275 /** 2276 * virtqueue_add_outbuf_premapped - expose output buffers to other end 2277 * @vq: the struct virtqueue we're talking about. 2278 * @sg: scatterlist (must be well-formed and terminated!) 2279 * @num: the number of entries in @sg readable by other side 2280 * @data: the token identifying the buffer. 2281 * @gfp: how to do memory allocations (if necessary). 2282 * 2283 * Caller must ensure we don't call this with other virtqueue operations 2284 * at the same time (except where noted). 2285 * 2286 * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO). 2287 */ 2288 int virtqueue_add_outbuf_premapped(struct virtqueue *vq, 2289 struct scatterlist *sg, unsigned int num, 2290 void *data, 2291 bool premapped, 2292 gfp_t gfp)
2293 { 2294 return virtqueue_add(vq, &sg, num, 1, 0, data, NULL, premapped, gfp);
2295 }
2296 EXPORT_SYMBOL_GPL(virtqueue_add_outbuf_premapped);
2297
2298 /**
2299 * virtqueue_add_inbuf - expose input buffers to other end
2300 * @vq: the struct virtqueue we're talking about.
2301 * @sg: scatterlist (must be well-formed and terminated!)
2302 * @num: the number of entries in @sg writable by other side
2303 * @data: the token identifying the buffer.
2304 * @gfp: how to do memory allocations (if necessary).
2305 *
2306 * Caller must ensure we don't call this with other virtqueue operations
2307 * at the same time (except where noted).
2308 *
2309 * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
2310 */
2311 int virtqueue_add_inbuf(struct virtqueue *vq,
2312 struct scatterlist *sg, unsigned int num,
2313 void *data,
2314 gfp_t gfp)
2315 {
2316 return virtqueue_add(vq, &sg, num, 0, 1, data, NULL, false, gfp);
2317 }
2318 EXPORT_SYMBOL_GPL(virtqueue_add_inbuf);
2319
2320 /**
2321 * virtqueue_add_inbuf_ctx - expose input buffers to other end
2322 * @vq: the struct virtqueue we're talking about.
2323 * @sg: scatterlist (must be well-formed and terminated!)
2324 * @num: the number of entries in @sg writable by other side
2325 * @data: the token identifying the buffer.
2326 * @ctx: extra context for the token
2327 * @gfp: how to do memory allocations (if necessary).
2328 *
2329 * Caller must ensure we don't call this with other virtqueue operations
2330 * at the same time (except where noted).
2331 *
2332 * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
2333 */
2334 int virtqueue_add_inbuf_ctx(struct virtqueue *vq,
2335 struct scatterlist *sg, unsigned int num,
2336 void *data,
2337 void *ctx,
2338 gfp_t gfp)
2339 {
2340 return virtqueue_add(vq, &sg, num, 0, 1, data, ctx, false, gfp);
2341 }
2342 EXPORT_SYMBOL_GPL(virtqueue_add_inbuf_ctx);
2343
2344 /**
2345 * virtqueue_add_inbuf_premapped - expose input buffers to other end
2346 * @vq: the struct virtqueue we're talking about.
2347 * @sg: scatterlist (must be well-formed and terminated!)
2348 * @num: the number of entries in @sg writable by other side
2349 * @data: the token identifying the buffer.
2350 * @ctx: extra context for the token
2351 * @gfp: how to do memory allocations (if necessary).
2352 *
2353 * Caller must ensure we don't call this with other virtqueue operations
2354 * at the same time (except where noted).
2355 *
2356 * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO).
2357 */
2358 int virtqueue_add_inbuf_premapped(struct virtqueue *vq,
2359 struct scatterlist *sg, unsigned int num,
2360 void *data,
2361 void *ctx,
2362 bool premapped,
2363 gfp_t gfp)2364 {2365 return virtqueue_add(vq, &sg, num, 0, 1, data, ctx, premapped, gfp); 2366 } 2367 EXPORT_SYMBOL_GPL(virtqueue_add_inbuf_premapped); 2368 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki