aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 208650b1ad3a..f17525a963d1 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -175,4 +175,11 @@ static inline __u32 ror32(__u32 word, unsigned int shift)
175 return (word >> shift) | (word << (32 - shift)); 175 return (word >> shift) | (word << (32 - shift));
176} 176}
177 177
178static inline unsigned fls_long(unsigned long l)
179{
180 if (sizeof(l) == 4)
181 return fls(l);
182 return fls64(l);
183}
184
178#endif 185#endif