109,6 → 109,17 |
return (word >> shift) | (word << (8 - shift)); |
} |
|
/** |
* sign_extend32 - sign extend a 32-bit value using specified bit as sign-bit |
* @value: value to sign extend |
* @index: 0 based bit index (0<=index<32) to sign bit |
*/ |
static inline __s32 sign_extend32(__u32 value, int index) |
{ |
__u8 shift = 31 - index; |
return (__s32)(value << shift) >> shift; |
} |
|
static inline unsigned fls_long(unsigned long l) |
{ |
if (sizeof(l) == 4) |
137,7 → 148,7 |
|
#ifdef __KERNEL__ |
|
#ifdef CONFIG_GENERIC_FIND_LAST_BIT |
#ifndef find_last_bit |
/** |
* find_last_bit - find the last set bit in a memory region |
* @addr: The address to start the search at |
147,7 → 158,7 |
*/ |
extern unsigned long find_last_bit(const unsigned long *addr, |
unsigned long size); |
#endif /* CONFIG_GENERIC_FIND_LAST_BIT */ |
#endif |
|
#endif /* __KERNEL__ */ |
#endif |