From f066b8f7d961b0f3ec08678a27f2f1a2f0148380 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Thu, 21 Jul 2022 14:03:31 -0700 Subject: [PATCH] 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`. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Reported-by: Nathan Chancellor Suggested-by: Nathan Chancellor Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20220721210331.4012015-1-justinstitt@google.com Signed-off-by: Joerg Roedel --- drivers/iommu/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index f09aedf..a07076b 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -603,7 +603,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; } -- 2.7.4