drivers: iommu: fix clang -wformat warning
Subsystems (3)
PATCH 1/1 drivers: iommu: fix clang -wformat warning
When building with Clang we encounter the following warning:
| drivers/iommu/msm_iommu.c:603:6: error: format specifies type 'unsigned | short' but the argument has type 'int' [-Werror,-Wformat] sid);
sid is an int, use the proper format specifier %x.
Reported-by Nathan Chancellor <[email protected]>
Suggested-by Nathan Chancellor <[email protected]>
Signed-off-by Justin Stitt <[email protected]>
---
Reported by Nathan here:
https://lore.kernel.org/all/[email protected]/
drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/msm_iommu.c +1 -1
@@ -599,7 +599,7 @@ static int insert_iommu_master(struct device *dev,for (sid =0 ; sid < master->num_mids; sid++)if (master->mids[sid] == spec->args[0 ]) { -dev_warn (dev,"Stream ID 0x%hx repeated; ignoring\n" , +dev_warn (dev,"Stream ID 0x%x repeated; ignoring\n" , sid);return 0 ; }
Signature · 1 line
2.37.1.359.gd136c6c3e2-goog
Quoted 10 lines · Justin Stitt
When building with Clang we encounter the following warning:
|drivers/iommu/msm_iommu.c:603:6: error: format specifies type 'unsigned | short' but the argument has type 'int' [-Werror,-Wformat] sid);
sidis an int, use the proper format specifier%x.Reported-by Nathan Chancellor <[email protected]>Suggested-by Nathan Chancellor <[email protected]>Signed-off-by Justin Stitt <[email protected]>
Thanks for the patch!
Reviewed-by Nathan Chancellor <[email protected]>
Quoted 24 lines
---
Reported by Nathan here:
https://lore.kernel.org/all/[email protected]/drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iommu/msm_iommu.c +1
-1@@ -599,7 +599,7 @@ static int insert_iommu_master(struct device *dev,for (sid =0 ; sid < master->num_mids; sid++)if (master->mids[sid] == spec->args[0 ]) { -dev_warn (dev,"Stream ID 0x%hx repeated; ignoring\n" , +dev_warn (dev,"Stream ID 0x%x repeated; ignoring\n" , sid);return 0 ; }Signature · 1 line
2.37.1.359.gd136c6c3e2-goog
Quoted 2 lines · Justin Stitt
drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.