summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorThomas Heijligen <src@posteo.de>2022-11-29 19:52:15 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-07 17:11:05 +0000
commit5dbd3df03c455d6c3b3f6b1ab080513206004b95 (patch)
tree7508ee9449e5819677fe3369683bd9f81ee09fed /payloads/libpayload/include
parentc0c62ebbae1d22c1882026cad41d530fa9854175 (diff)
libpayload: strings.h: Use builtin __ffs instead of included one
Change-Id: Ie4d0b1b19ce6524341449df8bfabc66bff7bd97e Signed-off-by: Thomas Heijligen <src@posteo.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70118 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/strings.h4
1 files changed, 1 insertions, 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 <libpayload.h>
-
-static inline int ffs(int i) { return __ffs(i) + 1; }
+#define ffs(x) __builtin_ffs(x)
#endif