diff mbox series

[1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code

Message ID 20210122131448.1167-1-thunder.leizhen@huawei.com (mailing list archive)
State New, archived
Headers show
Series [1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code | expand

Commit Message

Leizhen (ThunderTown) Jan. 22, 2021, 1:14 p.m. UTC
No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Will Deacon Jan. 22, 2021, 1:49 p.m. UTC | #1
On Fri, 22 Jan 2021 21:14:48 +0800, Zhen Lei wrote:
> No functional change.

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code
      https://git.kernel.org/will/c/932bc8c7d742

Cheers,
Leizhen (ThunderTown) Jan. 27, 2021, 2:05 a.m. UTC | #2
I've sent another set of patches. https://lkml.org/lkml/2021/1/26/1065
If those patches are acceptable, then this one should be ignored.


On 2021/1/22 21:14, Zhen Lei wrote:
> No functional change.
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> 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 bca458c00e48a8b..f04c55a7503c790 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 @@ static int arm_smmu_set_bus_ops(struct iommu_ops *ops)
>  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);
>  }
>
Will Deacon Jan. 27, 2021, 9:23 a.m. UTC | #3
On Wed, Jan 27, 2021 at 10:05:50AM +0800, Leizhen (ThunderTown) wrote:
> I've sent another set of patches. https://lkml.org/lkml/2021/1/26/1065
> If those patches are acceptable, then this one should be ignored.

I've already queued this one, so if you want me to drop it then you need to
send me a revert.

Will
Leizhen (ThunderTown) Jan. 27, 2021, 9:35 a.m. UTC | #4
On 2021/1/27 17:23, Will Deacon wrote:
> On Wed, Jan 27, 2021 at 10:05:50AM +0800, Leizhen (ThunderTown) wrote:
>> I've sent another set of patches. https://lkml.org/lkml/2021/1/26/1065
>> If those patches are acceptable, then this one should be ignored.
> 
> I've already queued this one, so if you want me to drop it then you need to
> send me a revert.

Thanks. Since it's queued, keep it. I'll update the new patch set.

> 
> Will
> 
> .
>
diff mbox series

Patch

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 bca458c00e48a8b..f04c55a7503c790 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 @@  static int arm_smmu_set_bus_ops(struct iommu_ops *ops)
 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);
 }