lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Mar 2016 10:07:48 +0000
From:	Marc Zyngier <marc.zyngier@....com>
To:	Axel Lin <axel.lin@...ics.com>,
	Linus Walleij <linus.walleij@...aro.org>
Cc:	Y Vo <yvo@....com>, Alexandre Courbot <gnurou@...il.com>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] gpio: xgene-sb: Use irq_domain_free_irqs_common
 instead of open coded

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@...ics.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@....com>

Thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ