From 37bd3aa6fac8ed2eda86e06f1aff854ed8b6acd8 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 14 Jan 2021 12:33:24 +0000 Subject: [PATCH] amd64: use builtins for all ffs* variants While here even up whitespace. --- sys/amd64/include/cpufunc.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 2bf2339c7d6..763ed2c64c8 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -160,24 +160,13 @@ enable_intr(void) #ifdef _KERNEL #define HAVE_INLINE_FFS -#define ffs(x) __builtin_ffs(x) +#define ffs(x) __builtin_ffs(x) #define HAVE_INLINE_FFSL - -static __inline __pure2 int -ffsl(long mask) -{ - - return (__builtin_ffsl(mask)); -} +#define ffsl(x) __builtin_ffsl(x) #define HAVE_INLINE_FFSLL - -static __inline __pure2 int -ffsll(long long mask) -{ - return (ffsl((long)mask)); -} +#define ffsll(x) __builtin_ffsll(x) #define HAVE_INLINE_FLS -- 2.45.0