* [anolis-intel-cloud:devel-5.10 1/1] drivers/iommu/ioasid.c:279: warning: Cannot understand * @brief Reserve capacity from the system pool
@ 2025-03-06 2:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-06 2:51 UTC (permalink / raw)
To: aubrey.li; +Cc: oe-kbuild-all
tree: https://gitee.com/anolis/intel-cloud-kernel.git devel-5.10
head: 3c59fae63abb869e722a6b1d048bd4501e4bc5bf
commit: 7ee0f38cdf9a18c8f6fe075090a3f5105be117d1 [1/1] iommu/ioasid: Support setting system-wide capacity
config: x86_64-anolis-intel-cloud-devel-5.10 (https://download.01.org/0day-ci/archive/20250306/202503061023.RAfFTXb2-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/20250306/202503061023.RAfFTXb2-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/202503061023.RAfFTXb2-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/iommu/ioasid.c:279: warning: Cannot understand * @brief Reserve capacity from the system pool
on line 279 - I thought it was a doc line
>> drivers/iommu/ioasid.c:306: warning: Cannot understand * @brief Return capacity to the system pool
on line 306 - I thought it was a doc line
drivers/iommu/ioasid.c:458: warning: Function parameter or member 'ioasid' not described in 'ioasid_get'
vim +279 drivers/iommu/ioasid.c
277
278 /**
> 279 * @brief Reserve capacity from the system pool
280 *
281 * @param nr_ioasid Number of IOASIDs requested to be reserved, 0 means
282 * reserve all remaining IDs.
283 *
284 * @return the remaining capacity on success, or errno
285 */
286 int ioasid_reserve_capacity(ioasid_t nr_ioasid)
287 {
288 int ret = 0;
289
290 spin_lock(&ioasid_allocator_lock);
291 if (nr_ioasid > ioasid_capacity_avail) {
292 ret = -ENOSPC;
293 goto done_unlock;
294 }
295 if (!nr_ioasid)
296 nr_ioasid = ioasid_capacity_avail;
297 ioasid_capacity_avail -= nr_ioasid;
298 ret = nr_ioasid;
299 done_unlock:
300 spin_unlock(&ioasid_allocator_lock);
301 return ret;
302 }
303 EXPORT_SYMBOL_GPL(ioasid_reserve_capacity);
304
305 /**
> 306 * @brief Return capacity to the system pool
307 * We trust the caller not to return more than it has reserved, we could
308 * also track reservation if needed.
309 *
310 * @param nr_ioasid Number of IOASIDs requested to be returned
311 *
312 * @return the remaining capacity on success, or errno
313 */
314 int ioasid_cancel_capacity(ioasid_t nr_ioasid)
315 {
316 int ret = 0;
317
318 spin_lock(&ioasid_allocator_lock);
319 if (nr_ioasid + ioasid_capacity_avail > ioasid_capacity) {
320 ret = -EINVAL;
321 goto done_unlock;
322 }
323 ioasid_capacity_avail += nr_ioasid;
324 ret = ioasid_capacity_avail;
325 done_unlock:
326 spin_unlock(&ioasid_allocator_lock);
327 return ret;
328 }
329 EXPORT_SYMBOL_GPL(ioasid_cancel_capacity);
330
--
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:[~2025-03-06 2:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 2:51 [anolis-intel-cloud:devel-5.10 1/1] drivers/iommu/ioasid.c:279: warning: Cannot understand * @brief Reserve capacity from the system pool 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.