Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <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>

authored by

Pranav Tyagi and committed by
Andrew Morton
6de1ef1c 9a42aed4

+1 -1
+1 -1
tools/testing/selftests/mm/uffd-stress.c
··· 51 51 pthread_attr_t attr; 52 52 53 53 #define swap(a, b) \ 54 - do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) 54 + do { __auto_type __tmp = (a); (a) = (b); (b) = __tmp; } while (0) 55 55 56 56 const char *examples = 57 57 "# Run anonymous memory test on 100MiB region with 99999 bounces:\n"