Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] oss/sonicvibes.c defines its own hweight32

sound/oss/sonicvibes.c:421: error: static declaration of hweight32 follows non-static declaration
include/asm-generic/bitops/hweight.h:6: error: previous declaration of hweight32 was here

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Richard Knutsson and committed by
Linus Torvalds
20548664 93635133

-18
-18
sound/oss/sonicvibes.c
··· 407 407 return r; 408 408 } 409 409 410 - /* 411 - * hweightN: returns the hamming weight (i.e. the number 412 - * of bits set) of a N-bit word 413 - */ 414 - 415 - #ifdef hweight32 416 - #undef hweight32 417 - #endif 418 - 419 - static inline unsigned int hweight32(unsigned int w) 420 - { 421 - unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); 422 - res = (res & 0x33333333) + ((res >> 2) & 0x33333333); 423 - res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); 424 - res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); 425 - return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); 426 - } 427 - 428 410 /* --------------------------------------------------------------------- */ 429 411 430 412 /*