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>] [day] [month] [year] [list]
Date:	Mon, 17 Sep 2012 13:24:25 -0700
From:	Rohit Vaswani <rvaswani@...eaurora.org>
To:	Wei Yongjun <weiyj.lk@...il.com>
CC:	David Brown <davidb@...eaurora.org>, grant.likely@...retlab.ca,
	linus.walleij@...aro.org, yongjun_wei@...ndmicro.com.cn,
	linux-kernel@...r.kernel.org
Subject: Re: [weiyj.lk@...il.com: [PATCH] gpio_msm: using for_each_set_bit
 to simplify the code]

On 9/17/2012 8:50 AM, David Brown wrote:
> ----- Forwarded message from Wei Yongjun <weiyj.lk@...il.com> -----
>
> Date: Fri, 14 Sep 2012 10:28:31 +0800
> From: Wei Yongjun <weiyj.lk@...il.com>
> To: grant.likely@...retlab.ca, linus.walleij@...aro.org
> Cc: yongjun_wei@...ndmicro.com.cn, linux-kernel@...r.kernel.org
> Subject: [PATCH] gpio_msm: using for_each_set_bit to simplify the code
>
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> Using for_each_set_bit() to simplify the code.
>
> spatch with a semantic match is used to found this.
> (http://coccinelle.lip6.fr/)
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
>   drivers/gpio/gpio-msm-v2.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
> index 5cb1227..38305be 100644
> --- a/drivers/gpio/gpio-msm-v2.c
> +++ b/drivers/gpio/gpio-msm-v2.c
> @@ -317,9 +317,7 @@ static void msm_summary_irq_handler(unsigned int irq, struct irq_desc *desc)
>   
>   	chained_irq_enter(chip, desc);
>   
> -	for (i = find_first_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS);
> -	     i < NR_GPIO_IRQS;
> -	     i = find_next_bit(msm_gpio.enabled_irqs, NR_GPIO_IRQS, i + 1)) {
> +	for_each_set_bit(i, msm_gpio.enabled_irqs, NR_GPIO_IRQS) {
>   		if (readl(GPIO_INTR_STATUS(i)) & BIT(INTR_STATUS))
>   			generic_handle_irq(msm_gpio_to_irq(&msm_gpio.gpio_chip,
>   							   i));
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
> ----- End forwarded message -----
>
Tested-by: Rohit Vaswani <rvaswani@...eaurora.org>

Thanks,
Rohit Vaswani

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ