From: Zhen Lei Date: Fri, 22 Jan 2021 13:14:48 +0000 (+0800) Subject: iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code X-Git-Tag: v5.15~1589^2~4^3~4^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=932bc8c7d742c30ce61f2add6cd1340795b0051c;p=platform%2Fkernel%2Flinux-starfive.git iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code No functional change. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210122131448.1167-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index bca458c..f04c55a 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -3479,11 +3479,7 @@ err_reset_pci_ops: __maybe_unused; static void __iomem *arm_smmu_ioremap(struct device *dev, resource_size_t start, resource_size_t size) { - struct resource res = { - .flags = IORESOURCE_MEM, - .start = start, - .end = start + size - 1, - }; + struct resource res = DEFINE_RES_MEM(start, size); return devm_ioremap_resource(dev, &res); }