From d3a29af990be24af62dfe783b3e8735afe68a44c Mon Sep 17 00:00:00 2001 From: Muhammad Usama Anjum Date: Thu, 31 Jul 2025 21:01:27 +0500 Subject: [PATCH] selftests: kselftest.h: add __unused macro Add __unused macro instead of using the complete verbose unused compiler attribute. The raw __attribute__((__unused__)) is quite long and makes code too much verbose to the kernel developer's taste. Link: https://lkml.kernel.org/r/20250731160132.1795351-4-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Albert Ou Cc: Alexandre Ghiti Cc: Baolin Wang Cc: Barry Song Cc: David Hildenbrand Cc: Dev Jain Cc: Jason Gunthorpe Cc: John Hubbard Cc: Leon Romanovsky Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Mariano Pache Cc: Michal Hocko Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: Sidhartha Kumar Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton --- tools/testing/selftests/kselftest.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index c3b6d2604b1e..8d17036d8839 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -92,6 +92,10 @@ #endif #define __printf(a, b) __attribute__((format(printf, a, b))) +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif + /* counters */ struct ksft_count { unsigned int ksft_pass; -- 2.51.0