From c172d9fe8d2609c3e7dc3739a877403d232e73bd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 6 Dec 2020 15:13:09 +0100 Subject: log2.h: Use uintXX_t instead of kernel specific types Change-Id: Ieb872551bdbe514f2c77f9aeb2b9ee42f6573909 --- include/osmocom/core/log2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/core/log2.h b/include/osmocom/core/log2.h index dfe9d37a..035ce86e 100644 --- a/include/osmocom/core/log2.h +++ b/include/osmocom/core/log2.h @@ -6,6 +6,7 @@ */ #pragma once +#include #define __always_inline inline __attribute__((always_inline)) /* from linux/asm-generic/bitops/{fls,fls64}.h - could later be enhanced @@ -58,9 +59,9 @@ static __always_inline int fls(unsigned int x) * set bit if value is nonzero. The last (most significant) bit is * at position 64. */ -static __always_inline int fls64(__u64 x) +static __always_inline int fls64(uint64_t x) { - __u32 h = x >> 32; + uint32_t h = x >> 32; if (h) return fls(h) + 32; return fls(x); -- cgit v1.2.3