Skip to content

Commit 30209b9

Browse files
John Garryjoergroedel
authored andcommitted
iommu: Fix some W=1 warnings
The code is mostly free of W=1 warning, so fix the following: drivers/iommu/iommu.c:996: warning: expecting prototype for iommu_group_for_each_dev(). Prototype was for __iommu_group_for_each_dev() instead drivers/iommu/iommu.c:3048: warning: Function parameter or member 'drvdata' not described in 'iommu_sva_bind_device' drivers/iommu/ioasid.c:354: warning: Function parameter or member 'ioasid' not described in 'ioasid_get' drivers/iommu/omap-iommu.c:1098: warning: expecting prototype for omap_iommu_suspend_prepare(). Prototype was for omap_iommu_prepare() instead Signed-off-by: John Garry <[email protected]> Reviewed-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent b54240a commit 30209b9

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

drivers/iommu/ioasid.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ EXPORT_SYMBOL_GPL(ioasid_alloc);
349349

350350
/**
351351
* ioasid_get - obtain a reference to the IOASID
352+
* @ioasid: the ID to get
352353
*/
353354
void ioasid_get(ioasid_t ioasid)
354355
{

drivers/iommu/iommu.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -985,17 +985,6 @@ static int iommu_group_device_count(struct iommu_group *group)
985985
return ret;
986986
}
987987

988-
/**
989-
* iommu_group_for_each_dev - iterate over each device in the group
990-
* @group: the group
991-
* @data: caller opaque data to be passed to callback function
992-
* @fn: caller supplied callback function
993-
*
994-
* This function is called by group users to iterate over group devices.
995-
* Callers should hold a reference count to the group during callback.
996-
* The group->mutex is held across callbacks, which will block calls to
997-
* iommu_group_add/remove_device.
998-
*/
999988
static int __iommu_group_for_each_dev(struct iommu_group *group, void *data,
1000989
int (*fn)(struct device *, void *))
1001990
{
@@ -1010,7 +999,17 @@ static int __iommu_group_for_each_dev(struct iommu_group *group, void *data,
1010999
return ret;
10111000
}
10121001

1013-
1002+
/**
1003+
* iommu_group_for_each_dev - iterate over each device in the group
1004+
* @group: the group
1005+
* @data: caller opaque data to be passed to callback function
1006+
* @fn: caller supplied callback function
1007+
*
1008+
* This function is called by group users to iterate over group devices.
1009+
* Callers should hold a reference count to the group during callback.
1010+
* The group->mutex is held across callbacks, which will block calls to
1011+
* iommu_group_add/remove_device.
1012+
*/
10141013
int iommu_group_for_each_dev(struct iommu_group *group, void *data,
10151014
int (*fn)(struct device *, void *))
10161015
{
@@ -3037,6 +3036,7 @@ EXPORT_SYMBOL_GPL(iommu_aux_get_pasid);
30373036
* iommu_sva_bind_device() - Bind a process address space to a device
30383037
* @dev: the device
30393038
* @mm: the mm to bind, caller must hold a reference to it
3039+
* @drvdata: opaque data pointer to pass to bind callback
30403040
*
30413041
* Create a bond between device and address space, allowing the device to access
30423042
* the mm using the returned PASID. If a bond already exists between @device and

drivers/iommu/omap-iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ static __maybe_unused int omap_iommu_runtime_resume(struct device *dev)
10851085
}
10861086

10871087
/**
1088-
* omap_iommu_suspend_prepare - prepare() dev_pm_ops implementation
1088+
* omap_iommu_prepare - prepare() dev_pm_ops implementation
10891089
* @dev: iommu device
10901090
*
10911091
* This function performs the necessary checks to determine if the IOMMU

0 commit comments

Comments
 (0)