linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Axel Lin <axel.lin@ingics.com>, Linus Walleij <linus.walleij@linaro.org>
Cc: Y Vo <yvo@apm.com>, Alexandre Courbot <gnurou@gmail.com>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] gpio: xgene-sb: Use irq_domain_free_irqs_common instead of open coded
Date: Thu, 17 Mar 2016 10:07:48 +0000	[thread overview]
Message-ID: <56EA81F4.40503@arm.com> (raw)
In-Reply-To: <1458187303.27037.3.camel@ingics.com>

On 17/03/16 04:01, Axel Lin wrote:
> Current code calls irq_domain_alloc_irqs_parent() in .alloc,
> so it should call irq_domain_free_irqs_parent() accordingly in .free.
> Fix it by switching to use irq_domain_free_irqs_common() instead.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/gpio/gpio-xgene-sb.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c
> index 31cbcb8..0332586 100644
> --- a/drivers/gpio/gpio-xgene-sb.c
> +++ b/drivers/gpio/gpio-xgene-sb.c
> @@ -216,23 +216,10 @@ static int xgene_gpio_sb_domain_alloc(struct irq_domain *domain,
>  			&parent_fwspec);
>  }
>  
> -static void xgene_gpio_sb_domain_free(struct irq_domain *domain,
> -		unsigned int virq,
> -		unsigned int nr_irqs)
> -{
> -	struct irq_data *d;
> -	unsigned int i;
> -
> -	for (i = 0; i < nr_irqs; i++) {
> -		d = irq_domain_get_irq_data(domain, virq + i);
> -		irq_domain_reset_irq_data(d);
> -	}
> -}
> -
>  static const struct irq_domain_ops xgene_gpio_sb_domain_ops = {
>  	.translate      = xgene_gpio_sb_domain_translate,
>  	.alloc          = xgene_gpio_sb_domain_alloc,
> -	.free           = xgene_gpio_sb_domain_free,
> +	.free           = irq_domain_free_irqs_common,
>  	.activate	= xgene_gpio_sb_domain_activate,
>  	.deactivate	= xgene_gpio_sb_domain_deactivate,
>  };
> 

Ah, nice catch. For both patches:

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2016-03-17 10:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17  4:00 [PATCH 1/2] irqdomain: Export irq_domain_free_irqs_common Axel Lin
2016-03-17  4:01 ` [PATCH 2/2] gpio: xgene-sb: Use irq_domain_free_irqs_common instead of open coded Axel Lin
2016-03-17 10:07   ` Marc Zyngier [this message]
2016-03-31  8:22   ` Linus Walleij
2016-03-17  9:48 ` [PATCH 1/2] irqdomain: Export irq_domain_free_irqs_common Thomas Gleixner
2016-03-31  8:21 ` Linus Walleij

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=56EA81F4.40503@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=axel.lin@ingics.com \
    --cc=gnurou@gmail.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yvo@apm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).