diff options
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index f35d543ce8..a98fce3ca2 100644 --- a/include/common.h +++ b/include/common.h @@ -156,4 +156,7 @@ enum ec_error_list { #define test_export_static static #endif +/* find the most significant bit. Not defined in n == 0. */ +#define __fls(n) (31 - __builtin_clz(n)) + #endif /* __CROS_EC_COMMON_H */ |