]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
selftests: kselftest.h: add __unused macro
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Thu, 31 Jul 2025 16:01:27 +0000 (21:01 +0500)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 18 Aug 2025 05:08:25 +0000 (22:08 -0700)
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 <usama.anjum@collabora.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/kselftest.h

index c3b6d2604b1e486af5a224a11386f75fe0a83495..8d17036d8839624bbe1b8689f1f42ef016a83f9f 100644 (file)
 #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;