提交 1b0b2a84 编写于 作者: W Wei Yongjun 提交者: Joerg Roedel

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: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200713142542.50294-1-weiyongjun1@huawei.comSigned-off-by: NJoerg Roedel <jroedel@suse.de>
上级 97215a7d
...@@ -383,8 +383,8 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf) ...@@ -383,8 +383,8 @@ static ssize_t iommu_group_show_name(struct iommu_group *group, char *buf)
* Elements are sorted by start address and overlapping segments * Elements are sorted by start address and overlapping segments
* of the same type are merged. * of the same type are merged.
*/ */
int iommu_insert_resv_region(struct iommu_resv_region *new, static int iommu_insert_resv_region(struct iommu_resv_region *new,
struct list_head *regions) struct list_head *regions)
{ {
struct iommu_resv_region *iter, *tmp, *nr, *top; struct iommu_resv_region *iter, *tmp, *nr, *top;
LIST_HEAD(stack); LIST_HEAD(stack);
...@@ -2179,8 +2179,8 @@ static size_t iommu_pgsize(struct iommu_domain *domain, ...@@ -2179,8 +2179,8 @@ static size_t iommu_pgsize(struct iommu_domain *domain,
return pgsize; return pgsize;
} }
int __iommu_map(struct iommu_domain *domain, unsigned long iova, static int __iommu_map(struct iommu_domain *domain, unsigned long iova,
phys_addr_t paddr, size_t size, int prot, gfp_t gfp) phys_addr_t paddr, size_t size, int prot, gfp_t gfp)
{ {
const struct iommu_ops *ops = domain->ops; const struct iommu_ops *ops = domain->ops;
unsigned long orig_iova = iova; unsigned long orig_iova = iova;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册