projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62c5549
)
[ALSA] usb-audio: optimize snd_usbmidi_count_bits()
author
Clemens Ladisch
<clemens@ladisch.de>
Mon, 27 Feb 2006 08:53:03 +0000
(09:53 +0100)
committer
Jaroslav Kysela
<perex@suse.cz>
Wed, 22 Mar 2006 09:31:19 +0000
(10:31 +0100)
Modules: USB generic driver
Reduce the code size of the snd_usbmidi_count_bits() function by using
simpler operations.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/usb/usbmidi.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/usb/usbmidi.c
b/sound/usb/usbmidi.c
index 7580339dba221f8f32adce93446b002b9ef7925c..2b9d940c8064e705cf7bfd27dd674f2e4780dc71 100644
(file)
--- a/
sound/usb/usbmidi.c
+++ b/
sound/usb/usbmidi.c
@@
-871,10
+871,10
@@
static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi,
static unsigned int snd_usbmidi_count_bits(unsigned int x)
{
- unsigned int bits
= 0
;
+ unsigned int bits;
- for (
; x; x >>= 1
)
-
bits += x &
1;
+ for (
bits = 0; x; ++bits
)
+
x &= x -
1;
return bits;
}