diff options
Diffstat (limited to 'include/linux/bitops.h')
| -rw-r--r-- | include/linux/bitops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 2b8ed123ad36..defeaac0745f 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -107,7 +107,7 @@ static inline __u64 ror64(__u64 word, unsigned int shift) | |||
| 107 | */ | 107 | */ |
| 108 | static inline __u32 rol32(__u32 word, unsigned int shift) | 108 | static inline __u32 rol32(__u32 word, unsigned int shift) |
| 109 | { | 109 | { |
| 110 | return (word << shift) | (word >> (32 - shift)); | 110 | return (word << shift) | (word >> ((-shift) & 31)); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | /** | 113 | /** |
