ANDROID: Fix compilation warning in __iommu_map_pages()
Commit08d46858c7("FROMLIST: iommu: Add support for the map_pages() callback") used the wrong format specifier for the count variable in __iommu_map_pages(), and introduced the following compilation warning: drivers/iommu/iommu.c: In function '__iommu_map_pages': >> drivers/iommu/iommu.c:7:24: warning: format '%ld' expects argument of >> type 'long int', but argument 6 has type 'size_t' {aka 'unsigned >> int'} [-Wformat=] 7 | #define pr_fmt(fmt) "iommu: " fmt | ^~~~~~~~~ include/linux/dynamic_debug.h:129:15: note: in expansion of macro 'pr_fmt' 129 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call' 147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, | ^~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call' 157 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:424:2: note: in expansion of macro 'dynamic_pr_debug' 424 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/iommu/iommu.c:2398:2: note: in expansion of macro 'pr_debug' 2398 | pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count %ld\n", | ^~~~~~~~ drivers/iommu/iommu.c:2398:60: note: format string is defined here 2398 | pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count %ld\n", Fix by using the correct format specifier for the count variable. Bug: 178537788 Fixes:08d46858c7("FROMLIST: iommu: Add support for the map_pages() callback") Reported-by: kernel test robot <lkp@intel.com> Change-Id: Idc116f559c89e7da8a2b7ae5d8ce173923424588 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
committed by
Will Deacon
parent
947f7639b3
commit
b492fa8a50
@@ -2395,7 +2395,7 @@ static int __iommu_map_pages(struct iommu_domain *domain, unsigned long iova,
|
||||
|
||||
pgsize = iommu_pgsize(domain, iova, paddr, size, &count);
|
||||
|
||||
pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count %ld\n",
|
||||
pr_debug("mapping: iova 0x%lx pa %pa pgsize 0x%zx count %zu\n",
|
||||
iova, &paddr, pgsize, count);
|
||||
|
||||
if (ops->map_pages) {
|
||||
|
||||
Reference in New Issue
Block a user