All of lore.kernel.org
 help / color / mirror / Atom feed
* [yiliu1765-iommufd:wip/iommufd_pasid-0825 13/95] drivers/iommu/iommufd/hw_pagetable.c:95: warning: Function parameter or member 'dummy' not described in 'iommufd_user_managed_hwpt_alloc'
@ 2023-08-25 11:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-25 11:34 UTC (permalink / raw)
  To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all

tree:   https://github.com/yiliu1765/iommufd.git wip/iommufd_pasid-0825
head:   98c119bc01ddf99ad4ac7c3e93980e3d835c0901
commit: fad95a279b65f9a1c32511e1fd65d5866e6bf75a [13/95] iommufd: Add user-managed hw_pagetable support
config: i386-buildonly-randconfig-002-20230823 (https://download.01.org/0day-ci/archive/20230825/202308251920.6MLefAoJ-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230825/202308251920.6MLefAoJ-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/202308251920.6MLefAoJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/iommu/iommufd/hw_pagetable.c:95: warning: Function parameter or member 'dummy' not described in 'iommufd_user_managed_hwpt_alloc'


vim +95 drivers/iommu/iommufd/hw_pagetable.c

    76	
    77	/**
    78	 * iommufd_user_managed_hwpt_alloc() - Get a user-managed hw_pagetable
    79	 * @ictx: iommufd context
    80	 * @pt_obj: Parent object to an HWPT to associate the domain with
    81	 * @idev: Device to get an iommu_domain for
    82	 * @hwpt_type: Requested type of hw_pagetable
    83	 * @user_data: user_data pointer
    84	 *
    85	 * Allocate a new iommu_domain (must be IOMMU_DOMAIN_NESTED) and return it as
    86	 * a user-managed hw_pagetable.
    87	 */
    88	static struct iommufd_hw_pagetable *
    89	iommufd_user_managed_hwpt_alloc(struct iommufd_ctx *ictx,
    90					struct iommufd_object *pt_obj,
    91					struct iommufd_device *idev,
    92					enum iommu_hwpt_type hwpt_type,
    93					struct iommu_user_data *user_data,
    94					bool dummy)
  > 95	{
    96		struct iommufd_hw_pagetable *parent =
    97			container_of(pt_obj, struct iommufd_hw_pagetable, obj);
    98		const struct iommu_ops *ops = dev_iommu_ops(idev->dev);
    99		struct iommufd_hw_pagetable *hwpt;
   100		int rc;
   101	
   102		if (!user_data)
   103			return ERR_PTR(-EINVAL);
   104		if (parent->auto_domain)
   105			return ERR_PTR(-EINVAL);
   106		if (hwpt_type == IOMMU_HWPT_TYPE_DEFAULT)
   107			return ERR_PTR(-EINVAL);
   108	
   109		if (!ops->domain_alloc_user)
   110			return ERR_PTR(-EOPNOTSUPP);
   111	
   112		lockdep_assert_held(&parent->mutex);
   113	
   114		hwpt = iommufd_object_alloc(ictx, hwpt, IOMMUFD_OBJ_HW_PAGETABLE);
   115		if (IS_ERR(hwpt))
   116			return hwpt;
   117	
   118		refcount_inc(&parent->obj.users);
   119		hwpt->parent = parent;
   120		hwpt->user_managed = true;
   121		hwpt->abort = iommufd_user_managed_hwpt_abort;
   122		hwpt->destroy = iommufd_user_managed_hwpt_destroy;
   123	
   124		hwpt->domain = ops->domain_alloc_user(idev->dev, hwpt_type,
   125						      parent->domain, user_data);
   126		if (IS_ERR(hwpt->domain)) {
   127			rc = PTR_ERR(hwpt->domain);
   128			hwpt->domain = NULL;
   129			goto out_abort;
   130		}
   131	
   132		if (WARN_ON_ONCE(hwpt->domain->type != IOMMU_DOMAIN_NESTED)) {
   133			rc = -EINVAL;
   134			goto out_abort;
   135		}
   136		/* Driver is buggy by missing cache_invalidate_user in domain_ops */
   137		if (WARN_ON_ONCE(!hwpt->domain->ops->cache_invalidate_user)) {
   138			rc = -EINVAL;
   139			goto out_abort;
   140		}
   141		return hwpt;
   142	
   143	out_abort:
   144		iommufd_object_abort_and_destroy(ictx, &hwpt->obj);
   145		return ERR_PTR(rc);
   146	}
   147	

-- 
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:[~2023-08-25 11:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 11:34 [yiliu1765-iommufd:wip/iommufd_pasid-0825 13/95] drivers/iommu/iommufd/hw_pagetable.c:95: warning: Function parameter or member 'dummy' not described in 'iommufd_user_managed_hwpt_alloc' 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.