Thread (36 messages) 36 messages, 5 authors, 2020-01-16
STALE2333d
Revisions (5)
  1. v15 current
  2. v16 [diff vs current]
  3. v16 [diff vs current]
  4. v18 [diff vs current]
  5. v19 [diff vs current]

[PATCH v15 05/23] selftests/vm/pkeys: Make gcc check arguments of sigsafe_printf()

From: Sandipan Das <hidden>
Date: 2019-12-18 07:53:47
Also in: linux-arch, linux-kselftest, linux-mm
Subsystem: kernel selftest framework, the rest · Maintainers: Shuah Khan, Linus Torvalds

From: Thiago Jung Bauermann <redacted>

This will help us ensure we print pkey_reg_t values correctly in
different architectures.

Signed-off-by: Thiago Jung Bauermann <redacted>
Signed-off-by: Sandipan Das <redacted>
---
 tools/testing/selftests/vm/pkey-helpers.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/vm/pkey-helpers.h b/tools/testing/selftests/vm/pkey-helpers.h
index 3ed2f021bf7a..7f18a82e54fc 100644
--- a/tools/testing/selftests/vm/pkey-helpers.h
+++ b/tools/testing/selftests/vm/pkey-helpers.h
@@ -27,6 +27,10 @@
 #define DPRINT_IN_SIGNAL_BUF_SIZE 4096
 extern int dprint_in_signal;
 extern char dprint_in_signal_buffer[DPRINT_IN_SIGNAL_BUF_SIZE];
+
+#ifdef __GNUC__
+__attribute__((format(printf, 1, 2)))
+#endif
 static inline void sigsafe_printf(const char *format, ...)
 {
 	va_list ap;
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help