public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Yury Norov <yury.norov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ste_dma40: simplify d40_handle_interrupt()
Date: Wed, 23 Jul 2025 17:42:21 +0530	[thread overview]
Message-ID: <aIDRpSN0z3Ri1Fkh@vaman> (raw)
In-Reply-To: <20250720022129.437094-1-yury.norov@gmail.com>

On 19-07-25, 22:21, Yury Norov wrote:
> From: Yury Norov (NVIDIA) <yury.norov@gmail.com>

What is the meaning of NVIDIA in your name?

Pls add the subsystem name to the patch as well (this and others you
sent)


> 
> Use for_each_set_bit() iterator and drop housekeeping code.
> 
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
> ---
>  drivers/dma/ste_dma40.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
> index d52e1685aed5..6cc76f935c7c 100644
> --- a/drivers/dma/ste_dma40.c
> +++ b/drivers/dma/ste_dma40.c
> @@ -1664,7 +1664,7 @@ static irqreturn_t d40_handle_interrupt(int irq, void *data)
>  	int i;
>  	u32 idx;
>  	u32 row;
> -	long chan = -1;
> +	long chan;
>  	struct d40_chan *d40c;
>  	struct d40_base *base = data;
>  	u32 *regs = base->regs_interrupt;
> @@ -1677,15 +1677,7 @@ static irqreturn_t d40_handle_interrupt(int irq, void *data)
>  	for (i = 0; i < il_size; i++)
>  		regs[i] = readl(base->virtbase + il[i].src);
>  
> -	for (;;) {
> -
> -		chan = find_next_bit((unsigned long *)regs,
> -				     BITS_PER_LONG * il_size, chan + 1);
> -
> -		/* No more set bits found? */
> -		if (chan == BITS_PER_LONG * il_size)
> -			break;
> -
> +	for_each_set_bit(chan, (unsigned long *)regs, BITS_PER_LONG * il_size) {
>  		row = chan / BITS_PER_LONG;
>  		idx = chan & (BITS_PER_LONG - 1);
>  
> -- 
> 2.43.0

-- 
~Vinod


  parent reply	other threads:[~2025-07-23 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-20  2:21 [PATCH] ste_dma40: simplify d40_handle_interrupt() Yury Norov
2025-07-23 11:41 ` Linus Walleij
2025-07-23 12:12 ` Vinod Koul [this message]
2025-07-25 15:35   ` Yury Norov

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=aIDRpSN0z3Ri1Fkh@vaman \
    --to=vkoul@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yury.norov@gmail.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