All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: aubrey.li@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [anolis-intel-cloud:devel-5.10 1/1] drivers/iommu/ioasid.c:279: warning: Cannot understand  * @brief Reserve capacity from the system pool
Date: Thu, 6 Mar 2025 10:51:38 +0800	[thread overview]
Message-ID: <202503061023.RAfFTXb2-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-03-06  2:52 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=202503061023.RAfFTXb2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aubrey.li@linux.intel.com \
    --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 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.