[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h3908a53w.wl%tiwai@suse.de>
Date: Sat, 17 Nov 2012 11:36:19 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Joe Perches <joe@...ches.com>
Cc: Akinobu Mita <akinobu.mita@...il.com>, alsa-devel@...a-project.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sound: use bitmap_weight
At Fri, 16 Nov 2012 23:35:16 -0800,
Joe Perches wrote:
>
> Use bitmap_weight to count the total number of bits set in bitmap.
>
> Signed-off-by: Joe Perches <joe@...ches.com>
Thanks, applied.
Takashi
> ---
> sound/usb/endpoint.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
> index 34de6f2..51a9aa3 100644
> --- a/sound/usb/endpoint.c
> +++ b/sound/usb/endpoint.c
> @@ -485,15 +485,10 @@ __exit_unlock:
> static int wait_clear_urbs(struct snd_usb_endpoint *ep)
> {
> unsigned long end_time = jiffies + msecs_to_jiffies(1000);
> - unsigned int i;
> int alive;
>
> do {
> - alive = 0;
> - for (i = 0; i < ep->nurbs; i++)
> - if (test_bit(i, &ep->active_mask))
> - alive++;
> -
> + alive = bitmap_weight(&ep->active_mask, ep->nurbs);
> if (!alive)
> break;
>
>
>
--
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