[PATCH 4/9] scripts: define __printf attribute macro

Ahmad Fatoum a.fatoum at pengutronix.de
Tue May 27 13:13:54 PDT 2025


In preparation for wider use of __printf, define it also for scripts and
not only in include/.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 scripts/include/linux/compiler.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/include/linux/compiler.h b/scripts/include/linux/compiler.h
index 780ccec21a3c..9e95b510c825 100644
--- a/scripts/include/linux/compiler.h
+++ b/scripts/include/linux/compiler.h
@@ -23,6 +23,10 @@
 # define __packed		__attribute__((__packed__))
 #endif
 
+#ifndef __printf
+# define __printf(a, b)		__attribute__((format(__printf__, a, b)))
+#endif
+
 #ifndef __force
 # define __force
 #endif
-- 
2.39.5




More information about the barebox mailing list