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]
Message-ID: <3dcce108-dcd0-59f9-33cc-061ec0f1bbfe@gmail.com>
Date:   Fri, 19 Nov 2021 21:59:41 +0200
From:   Péter Ujfalusi <peter.ujfalusi@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        vkoul@...nel.org
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] dmaengine: ti: edma: Use 'for_each_set_bit' when possible



On 18/11/2021 21:28, Christophe JAILLET wrote:
> Use 'for_each_set_bit()' instead of hand wrinting it. It is much less
> version.

Thanks for the patch!

Acked-by: Peter Ujfalusi <peter.ujfalusi@...il.com>


> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/dma/ti/edma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index caa4050ecc02..08e47f44d325 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -1681,8 +1681,7 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
>  
>  			dev_dbg(ecc->dev, "EMR%d 0x%08x\n", j, val);
>  			emr = val;
> -			for (i = find_first_bit(&emr, 32); i < 32;
> -			     i = find_next_bit(&emr, 32, i + 1)) {
> +			for_each_set_bit(i, &emr, 32) {
>  				int k = (j << 5) + i;
>  
>  				/* Clear the corresponding EMR bits */
> 

-- 
Péter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ