From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>, vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dmaengine: ti: edma: Use 'for_each_set_bit' when possible
Date: Fri, 19 Nov 2021 21:59:41 +0200 [thread overview]
Message-ID: <3dcce108-dcd0-59f9-33cc-061ec0f1bbfe@gmail.com> (raw)
In-Reply-To: <47a7415d3aff8dfb66780bd6f80b085db4503bf7.1637263609.git.christophe.jaillet@wanadoo.fr>
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@gmail.com>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.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
next prev parent reply other threads:[~2021-11-19 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 19:28 [PATCH] dmaengine: ti: edma: Use 'for_each_set_bit' when possible Christophe JAILLET
2021-11-19 19:59 ` Péter Ujfalusi [this message]
2021-11-22 4:20 ` Vinod Koul
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=3dcce108-dcd0-59f9-33cc-061ec0f1bbfe@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmaengine@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox