]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
selftests/mm: use __auto_type in swap() macro
authorPranav Tyagi <pranav.tyagi03@gmail.com>
Wed, 30 Jul 2025 14:23:01 +0000 (19:53 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:24:38 +0000 (17:24 -0700)
Replace typeof() with __auto_type in the swap() macro in uffd-stress.c.
__auto_type was introduced in GCC 4.9 and reduces the compile time for all
compilers.  No functional changes intended.

Link: https://lkml.kernel.org/r/20250730142301.6754-1-pranav.tyagi03@gmail.com
Signed-off-by: Pranav Tyagi <pranav.tyagi03@gmail.com>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-stress.c

index 40af7f67c4074d901be6608e5d64bd0490026dae..c0f64df5085c4a4cf7928040e8b4febc440af589 100644 (file)
@@ -51,7 +51,7 @@ static char *zeropage;
 pthread_attr_t attr;
 
 #define swap(a, b) \
-       do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
+       do { __auto_type __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
 
 const char *examples =
        "# Run anonymous memory test on 100MiB region with 99999 bounces:\n"