* [yiliu1765-iommufd:wip/iommufd_pasid-20240830-notest-yet 22/22] drivers/iommu/iommufd/pasid.c:66:48: warning: passing argument 2 of 'iommufd_hwpt_replace_device' makes integer from pointer without a cast
@ 2024-08-31 6:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-31 6:42 UTC (permalink / raw)
To: Yi Liu, Kevin Tian; +Cc: oe-kbuild-all
tree: https://github.com/yiliu1765/iommufd.git wip/iommufd_pasid-20240830-notest-yet
head: aa93c979a57a5a050175b1d62886d9eb31dc0a6c
commit: aa93c979a57a5a050175b1d62886d9eb31dc0a6c [22/22] iommufd: Support attach/replace hwpt per pasid
config: arc-randconfig-002-20240831 (https://download.01.org/0day-ci/archive/20240831/202408311451.s5HpbNeo-lkp@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240831/202408311451.s5HpbNeo-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/202408311451.s5HpbNeo-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/iommu/iommufd/pasid.c:4:
include/linux/iommufd.h:30:33: error: unknown type name 'ioasid_t'
30 | ioasid_t pasid, u32 *pt_id);
| ^~~~~~~~
include/linux/iommufd.h:32:34: error: unknown type name 'ioasid_t'
32 | ioasid_t pasid, u32 *pt_id);
| ^~~~~~~~
include/linux/iommufd.h:33:63: error: unknown type name 'ioasid_t'
33 | void iommufd_device_pasid_detach(struct iommufd_device *idev, ioasid_t pasid);
| ^~~~~~~~
drivers/iommu/iommufd/pasid.c: In function 'iommufd_device_pasid_do_replace':
drivers/iommu/iommufd/pasid.c:66:42: error: passing argument 1 of 'iommufd_hwpt_replace_device' from incompatible pointer type [-Werror=incompatible-pointer-types]
66 | rc = iommufd_hwpt_replace_device(hwpt, idev, pasid, hwpt, curr);
| ^~~~
| |
| struct iommufd_hw_pagetable *
In file included from drivers/iommu/iommufd/pasid.c:8:
drivers/iommu/iommufd/iommufd_private.h:592:70: note: expected 'struct iommufd_device *' but argument is of type 'struct iommufd_hw_pagetable *'
592 | static inline int iommufd_hwpt_replace_device(struct iommufd_device *idev,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/iommu/iommufd/pasid.c:66:48: warning: passing argument 2 of 'iommufd_hwpt_replace_device' makes integer from pointer without a cast [-Wint-conversion]
66 | rc = iommufd_hwpt_replace_device(hwpt, idev, pasid, hwpt, curr);
| ^~~~
| |
| struct iommufd_device *
drivers/iommu/iommufd/iommufd_private.h:593:56: note: expected 'ioasid_t' {aka 'unsigned int'} but argument is of type 'struct iommufd_device *'
593 | ioasid_t pasid,
| ~~~~~~~~~^~~~~
>> drivers/iommu/iommufd/pasid.c:66:54: warning: passing argument 3 of 'iommufd_hwpt_replace_device' makes pointer from integer without a cast [-Wint-conversion]
66 | rc = iommufd_hwpt_replace_device(hwpt, idev, pasid, hwpt, curr);
| ^~~~~
| |
| ioasid_t {aka unsigned int}
drivers/iommu/iommufd/iommufd_private.h:594:76: note: expected 'struct iommufd_hw_pagetable *' but argument is of type 'ioasid_t' {aka 'unsigned int'}
594 | struct iommufd_hw_pagetable *hwpt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/iommu/iommufd/pasid.c:66:14: error: too many arguments to function 'iommufd_hwpt_replace_device'
66 | rc = iommufd_hwpt_replace_device(hwpt, idev, pasid, hwpt, curr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/iommufd_private.h:592:19: note: declared here
592 | static inline int iommufd_hwpt_replace_device(struct iommufd_device *idev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/pasid.c: At top level:
drivers/iommu/iommufd/pasid.c:98:5: warning: no previous prototype for 'iommufd_device_pasid_attach' [-Wmissing-prototypes]
98 | int iommufd_device_pasid_attach(struct iommufd_device *idev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/pasid.c:126:5: warning: no previous prototype for 'iommufd_device_pasid_replace' [-Wmissing-prototypes]
126 | int iommufd_device_pasid_replace(struct iommufd_device *idev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/pasid.c:147:6: warning: no previous prototype for 'iommufd_device_pasid_detach' [-Wmissing-prototypes]
147 | void iommufd_device_pasid_detach(struct iommufd_device *idev, ioasid_t pasid)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iommufd_hwpt_replace_device +66 drivers/iommu/iommufd/pasid.c
39
40 struct iommufd_hw_pagetable *
41 iommufd_device_pasid_do_replace(struct iommufd_device *idev, ioasid_t pasid,
42 struct iommufd_hw_pagetable *hwpt)
43 {
44 void *curr;
45 int rc;
46
47 refcount_inc(&hwpt->obj.users);
48 curr = xa_store(&idev->pasid_hwpts, pasid, hwpt, GFP_KERNEL);
49 rc = xa_err(curr);
50 if (rc)
51 goto out_put_hwpt;
52
53 if (!curr) {
54 xa_erase(&idev->pasid_hwpts, pasid);
55 rc = -EINVAL;
56 goto out_put_hwpt;
57 }
58
59 if (curr == hwpt)
60 goto out_put_hwpt;
61
62 /*
63 * After replacement, the reference on the old hwpt is retained
64 * in this thread as caller would free it.
65 */
> 66 rc = iommufd_hwpt_replace_device(hwpt, idev, pasid, hwpt, curr);
67 if (rc) {
68 WARN_ON(xa_err(xa_store(&idev->pasid_hwpts, pasid,
69 curr, GFP_KERNEL)));
70 goto out_put_hwpt;
71 }
72
73 /* Caller must destroy old_hwpt */
74 return curr;
75
76 out_put_hwpt:
77 refcount_dec(&hwpt->obj.users);
78 return ERR_PTR(rc);
79 }
80
--
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:[~2024-08-31 6:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31 6:42 [yiliu1765-iommufd:wip/iommufd_pasid-20240830-notest-yet 22/22] drivers/iommu/iommufd/pasid.c:66:48: warning: passing argument 2 of 'iommufd_hwpt_replace_device' makes integer from pointer 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.