iommu: Fix printk arg in of_iommu_get_resv_regions()
PATCH 1/1 iommu: Fix printk arg in of_iommu_get_resv_regions()
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 a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()")
Signed-off-by Daniel Mentz <[email protected]>
--- drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/of_iommu.c +1 -1
@@ -191,7 +191,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 ; }
Signature · 1 line
2.42.0.869.gea05f2083d-goog
Quoted 10 lines · Daniel Mentz
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 a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()")Signed-off-by Daniel Mentz <[email protected]>--- drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Ugh... I don't know why I missed that, because I thought I had tested that path. In any case, this fix is correct, so:
Acked-by Thierry Reding <[email protected]>
Joerg Roedel
AppliedQuoted 2 lines · Daniel Mentz
drivers/iommu/of_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 10 lines
Jörg Rödel [email protected] SUSE Software Solutions Germany GmbH Frankenstraße 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman