Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441007 > unrolled thread
| Started by | Peng Fan <van.freenix@gmail.com> |
|---|---|
| First post | 2016-07-12 03:40 +0200 |
| Last post | 2016-07-12 12:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] iommu: arm-smmu: drop devm_free_irq when driver detach Peng Fan <van.freenix@gmail.com> - 2016-07-12 03:40 +0200
Re: [PATCH] iommu: arm-smmu: drop devm_free_irq when driver detach Robin Murphy <robin.murphy@arm.com> - 2016-07-12 12:20 +0200
| From | Peng Fan <van.freenix@gmail.com> |
|---|---|
| Date | 2016-07-12 03:40 +0200 |
| Subject | [PATCH] iommu: arm-smmu: drop devm_free_irq when driver detach |
| Message-ID | <rTUQ1-6xe-1@gated-at.bofh.it> |
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Robin Murphy <robin.murphy@arm.com> --- drivers/iommu/arm-smmu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 860652e..5837391c 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -2045,9 +2045,6 @@ static int arm_smmu_device_remove(struct platform_device *pdev) if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS)) dev_err(dev, "removing device with active domains!\n"); - for (i = 0; i < smmu->num_global_irqs; ++i) - devm_free_irq(smmu->dev, smmu->irqs[i], smmu); - /* Turn the thing off */ writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0); return 0; -- 2.6.2
[toc] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2016-07-12 12:20 +0200 |
| Message-ID | <rU2Xg-3xz-13@gated-at.bofh.it> |
| In reply to | #1441007 |
On 12/07/16 02:33, Peng Fan wrote:
> There is no need to call devm_free_irq when driver detach.
> devres_release_all which is called after 'drv->remove' will
> release all managed resources.
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
drivers/iommu/arm-smmu.c: In function 'arm_smmu_device_remove':
drivers/iommu/arm-smmu.c:2021:6: warning: unused variable 'i'
[-Wunused-variable]
int i;
^
With that addressed:
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/iommu/arm-smmu.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 860652e..5837391c 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -2045,9 +2045,6 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
> if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS))
> dev_err(dev, "removing device with active domains!\n");
>
> - for (i = 0; i < smmu->num_global_irqs; ++i)
> - devm_free_irq(smmu->dev, smmu->irqs[i], smmu);
> -
> /* Turn the thing off */
> writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
> return 0;
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web