[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82ed62dd7070203701b4ca326e62862404dd5f72.1693216959.git.maciej.wieczor-retman@intel.com>
Date: Mon, 28 Aug 2023 12:49:10 +0200
From: "Wieczor-Retman, Maciej" <maciej.wieczor-retman@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>, Shuah Khan <shuah@...nel.org>
Cc: ilpo.jarvinen@...ux.intel.com, reinette.chatre@...el.com,
"Wieczor-Retman, Maciej" <maciej.wieczor-retman@...el.com>,
Wieczor-Retman@...r.kernel.org, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] selftests/kvm: Replace attribute with macro
The __printf() macro is used in many tools in the linux kernel to
validate the format specifiers in functions that use printf. Some
selftests use it without putting it in a macro definition and some tests
import the kselftests.h header.
Use __printf() attribute instead of the full attribute since the macro
is inside kselftests.h and the header is already imported.
Signed-off-by: Wieczor-Retman, Maciej <maciej.wieczor-retman@...el.com>
---
tools/testing/selftests/kvm/include/test_util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h
index a6e9f215ce70..710a8a78e8ce 100644
--- a/tools/testing/selftests/kvm/include/test_util.h
+++ b/tools/testing/selftests/kvm/include/test_util.h
@@ -33,7 +33,7 @@ static inline int _no_printf(const char *format, ...) { return 0; }
#define pr_info(...) _no_printf(__VA_ARGS__)
#endif
-void print_skip(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
+void __printf(1, 2) print_skip(const char *fmt, ...);
#define __TEST_REQUIRE(f, fmt, ...) \
do { \
if (!(f)) \
--
2.42.0
Powered by blists - more mailing lists