From 5dbd3df03c455d6c3b3f6b1ab080513206004b95 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 29 Nov 2022 19:52:15 +0100 Subject: [PATCH] libpayload: strings.h: Use builtin __ffs instead of included one Change-Id: Ie4d0b1b19ce6524341449df8bfabc66bff7bd97e Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/coreboot/+/70118 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- payloads/libpayload/include/strings.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/payloads/libpayload/include/strings.h b/payloads/libpayload/include/strings.h index e83d6c1587..f8873b2357 100644 --- a/payloads/libpayload/include/strings.h +++ b/payloads/libpayload/include/strings.h @@ -29,8 +29,6 @@ #ifndef _STRINGS_H #define _STRINGS_H -#include - -static inline int ffs(int i) { return __ffs(i) + 1; } +#define ffs(x) __builtin_ffs(x) #endif