Skip to content

Commit 1b0b2a8

Browse files
Wei Yongjunjoergroedel
authored andcommitted
iommu: Make some functions static
The sparse tool complains as follows: drivers/iommu/iommu.c:386:5: warning: symbol 'iommu_insert_resv_region' was not declared. Should it be static? drivers/iommu/iommu.c:2182:5: warning: symbol '__iommu_map' was not declared. Should it be static? Those functions are not used outside of iommu.c, so mark them static. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 97215a7 commit 1b0b2a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/iommu/iommu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf)
383383
* Elements are sorted by start address and overlapping segments
384384
* of the same type are merged.
385385
*/
386-
int iommu_insert_resv_region(struct iommu_resv_region *new,
387-
struct list_head *regions)
386+
static int iommu_insert_resv_region(struct iommu_resv_region *new,
387+
struct list_head *regions)
388388
{
389389
struct iommu_resv_region *iter, *tmp, *nr, *top;
390390
LIST_HEAD(stack);
@@ -2179,8 +2179,8 @@ static size_t iommu_pgsize(struct iommu_domain *domain,
21792179
return pgsize;
21802180
}
21812181

2182-
int __iommu_map(struct iommu_domain *domain, unsigned long iova,
2183-
phys_addr_t paddr, size_t size, int prot, gfp_t gfp)
2182+
static int __iommu_map(struct iommu_domain *domain, unsigned long iova,
2183+
phys_addr_t paddr, size_t size, int prot, gfp_t gfp)
21842184
{
21852185
const struct iommu_ops *ops = domain->ops;
21862186
unsigned long orig_iova = iova;

0 commit comments

Comments
 (0)