From 6cd87a55c02ba818ee9354d4ad53dac765b51d18 Mon Sep 17 00:00:00 2001 From: Pranav Tyagi Date: Wed, 30 Jul 2025 19:53:01 +0530 Subject: [PATCH] selftests/mm: use __auto_type in swap() macro 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 Reviewed-by: Joshua Hahn Cc: Peter Xu Cc: Shuah Khan Signed-off-by: Andrew Morton --- tools/testing/selftests/mm/uffd-stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 40af7f67c4074..c0f64df5085c4 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -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" -- 2.51.0