Commit 33895718 authored by Daniel Mentz's avatar Daniel Mentz Committed by Zheng Zengkai
Browse files

iommu: Fix printk arg in of_iommu_get_resv_regions()

stable inclusion
from stable-v6.6.5
commit e8841b225b5f1826ec33ed6a713d4fb7e09a4256
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8N21P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e8841b225b5f1826ec33ed6a713d4fb7e09a4256



--------------------------------

[ Upstream commit c2183b3dcc9dd41b768569ea88bededa58cceebb ]

The variable phys is defined as (struct resource *) which aligns with
the printk format specifier %pr. Taking the address of it results in a
value of type (struct resource **) which is incompatible with the format
specifier %pr. Therefore, remove the address of operator (&).

Fixes: a5bf3cfc ("iommu: Implement of_iommu_get_resv_regions()")
Signed-off-by: default avatarDaniel Mentz <danielmentz@google.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20231108062226.928985-1-danielmentz@google.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d799a783
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ iommu_resv_region_get_type(struct device *dev,
	if (start == phys->start && end == phys->end)
		return IOMMU_RESV_DIRECT;

	dev_warn(dev, "treating non-direct mapping [%pr] -> [%pap-%pap] as reservation\n", &phys,
	dev_warn(dev, "treating non-direct mapping [%pr] -> [%pap-%pap] as reservation\n", phys,
		 &start, &end);
	return IOMMU_RESV_RESERVED;
}