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

lib: export bitrev16

Bluetooth will be able to use this.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Harvey Harrison and committed by
Linus Torvalds
3527fb32 f2eb4327

+3 -1
+1
include/linux/bitrev.h
··· 10 10 return byte_rev_table[byte]; 11 11 } 12 12 13 + extern u16 bitrev16(u16 in); 13 14 extern u32 bitrev32(u32 in); 14 15 15 16 #endif /* _LINUX_BITREV_H */
+2 -1
lib/bitrev.c
··· 42 42 }; 43 43 EXPORT_SYMBOL_GPL(byte_rev_table); 44 44 45 - static __always_inline u16 bitrev16(u16 x) 45 + u16 bitrev16(u16 x) 46 46 { 47 47 return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); 48 48 } 49 + EXPORT_SYMBOL(bitrev16); 49 50 50 51 /** 51 52 * bitrev32 - reverse the order of bits in a u32 value