All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Peng Fan <van.freenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	will.deacon-5wv7dgnIgG8@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq
Date: Mon, 11 Jul 2016 11:32:55 +0100	[thread overview]
Message-ID: <578375D7.7090609@arm.com> (raw)
In-Reply-To: <1467625102-9755-1-git-send-email-van.freenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 04/07/16 10:38, Peng Fan wrote:
> Use devm_request_irq to simplify error handling path,
> when probe smmu device.
> 
> Also devm_{request|free}_irq when init or destroy domain context.
> 
> Signed-off-by: Peng Fan <van.freenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
> Cc: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> ---
[...]
> @@ -2050,7 +2046,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  		dev_err(dev, "removing device with active domains!\n");
>  
>  	for (i = 0; i < smmu->num_global_irqs; ++i)
> -		free_irq(smmu->irqs[i], smmu);
> +		devm_free_irq(smmu->dev, smmu->irqs[i], smmu);

There shouldn't be any need for this at all, since the very next thing
called after drv->remove() is devres_release_all().

Robin.

>  
>  	/* Turn the thing off */
>  	writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
> 

WARNING: multiple messages have this Message-ID (diff)
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq
Date: Mon, 11 Jul 2016 11:32:55 +0100	[thread overview]
Message-ID: <578375D7.7090609@arm.com> (raw)
In-Reply-To: <1467625102-9755-1-git-send-email-van.freenix@gmail.com>

On 04/07/16 10:38, Peng Fan wrote:
> Use devm_request_irq to simplify error handling path,
> when probe smmu device.
> 
> Also devm_{request|free}_irq when init or destroy domain context.
> 
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> ---
[...]
> @@ -2050,7 +2046,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  		dev_err(dev, "removing device with active domains!\n");
>  
>  	for (i = 0; i < smmu->num_global_irqs; ++i)
> -		free_irq(smmu->irqs[i], smmu);
> +		devm_free_irq(smmu->dev, smmu->irqs[i], smmu);

There shouldn't be any need for this at all, since the very next thing
called after drv->remove() is devres_release_all().

Robin.

>  
>  	/* Turn the thing off */
>  	writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
> 

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Peng Fan <van.freenix@gmail.com>, will.deacon@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq
Date: Mon, 11 Jul 2016 11:32:55 +0100	[thread overview]
Message-ID: <578375D7.7090609@arm.com> (raw)
In-Reply-To: <1467625102-9755-1-git-send-email-van.freenix@gmail.com>

On 04/07/16 10:38, Peng Fan wrote:
> Use devm_request_irq to simplify error handling path,
> when probe smmu device.
> 
> Also devm_{request|free}_irq when init or destroy domain context.
> 
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> ---
[...]
> @@ -2050,7 +2046,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  		dev_err(dev, "removing device with active domains!\n");
>  
>  	for (i = 0; i < smmu->num_global_irqs; ++i)
> -		free_irq(smmu->irqs[i], smmu);
> +		devm_free_irq(smmu->dev, smmu->irqs[i], smmu);

There shouldn't be any need for this at all, since the very next thing
called after drv->remove() is devres_release_all().

Robin.

>  
>  	/* Turn the thing off */
>  	writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
> 

  parent reply	other threads:[~2016-07-11 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  9:38 [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Peng Fan
2016-07-04  9:38 ` Peng Fan
2016-07-04  9:38 ` Peng Fan
     [not found] ` <1467625102-9755-1-git-send-email-van.freenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-11 10:32   ` Robin Murphy [this message]
2016-07-11 10:32     ` Robin Murphy
2016-07-11 10:32     ` Robin Murphy
2016-07-11 10:38     ` Will Deacon
2016-07-11 10:38       ` Will Deacon
2016-07-12  1:24     ` Peng Fan
2016-07-12  1:24       ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=578375D7.7090609@arm.com \
    --to=robin.murphy-5wv7dgnigg8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=van.freenix-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.