Messages in this thread Patch in this message | | | From | Martin Kepplinger <> | Subject | [PATCH 1/2] bitops.h: improve documentation for sign_extend32() | Date | Tue, 20 Jan 2015 13:30:54 +0100 |
| |
Signed-off-by: Martin Kepplinger <martink@posteo.de> --- include/linux/bitops.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 5d858e0..336f22b 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -164,6 +164,8 @@ static inline __u8 ror8(__u8 word, unsigned int 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 + * + * Safe to use for sign extending to 8 and 16 bit data types aswell. */ static inline __s32 sign_extend32(__u32 value, int index) { -- 2.1.4
| |