Commit b492fa8a authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Will Deacon
Browse files

ANDROID: Fix compilation warning in __iommu_map_pages()



Commit 08d46858 ("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: 08d46858 ("FROMLIST: iommu: Add support for the map_pages() callback")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Change-Id: Idc116f559c89e7da8a2b7ae5d8ce173923424588
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 947f7639
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment