From: Muhammad Usama Anjum Date: Thu, 31 Jul 2025 16:01:27 +0000 (+0500) Subject: selftests: kselftest.h: add __unused macro X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d3a29af990be24af62dfe783b3e8735afe68a44c;p=users%2Fjedix%2Flinux-maple.git 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 --- 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;