linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/mm: use __auto_type in swap() macro
@ 2025-07-30 14:23 Pranav Tyagi
  2025-08-06 15:45 ` Pranav Tyagi
  2025-08-06 16:48 ` Joshua Hahn
  0 siblings, 2 replies; 6+ messages in thread
From: Pranav Tyagi @ 2025-07-30 14:23 UTC (permalink / raw)
  To: akpm, peterx, shuah, linux-mm, linux-kselftest, linux-kernel
  Cc: linux-kernel-mentees, Pranav Tyagi

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.

Signed-off-by: Pranav Tyagi <pranav.tyagi03@gmail.com>
---
 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 40af7f67c407..c0f64df5085c 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.49.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-08-26 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 14:23 [PATCH] selftests/mm: use __auto_type in swap() macro Pranav Tyagi
2025-08-06 15:45 ` Pranav Tyagi
2025-08-06 16:46   ` Peter Xu
2025-08-26 16:23     ` Pranav Tyagi
2025-08-06 16:48 ` Joshua Hahn
2025-08-26 16:26   ` Pranav Tyagi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).