mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sound: use bitmap_weight
Date: Sat, 17 Nov 2012 11:36:19 +0100	[thread overview]
Message-ID: <s5h3908a53w.wl%tiwai@suse.de> (raw)
In-Reply-To: <1353137716.12430.3.camel@joe-AO722>

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@perches.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;
>  
> 
> 

      reply	other threads:[~2012-11-17 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1353134389-25583-1-git-send-email-akinobu.mita@gmail.com>
2012-11-17  7:35 ` Joe Perches
2012-11-17 10:36   ` Takashi Iwai [this message]

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=s5h3908a53w.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akinobu.mita@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®