mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test
@ 2026-09-23 11:01 Yeoreum Yun
  2026-09-23 13:54 ` David Hildenbrand (Arm)
  0 siblings, 1 reply; 3+ messages in thread
From: Yeoreum Yun @ 2026-09-23 11:01 UTC (permalink / raw)
  To: linux-mm, linux-kselftest, linux-kernel
  Cc: akpm, david, ziy, baolin.wang, liam, nico.pache, ryan.roberts,
	dev.jain, baohua, lance.yang, usama.arif, kas, ljs, vbabka, rppt,
	surenb, mhocko, shuah, Yeoreum Yun

Instead of comparing mem_ops->name to determine whether mem_ops is
anon_ops, use the is_anon() helper.

Suggested-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
---
NOTE:
  This patch is based on mm/mm-unstable.
---
 tools/testing/selftests/mm/khugepaged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/khugepaged.c b/tools/testing/selftests/mm/khugepaged.c
index bdc0c7c117d9..b0cb02bf1a73 100644
--- a/tools/testing/selftests/mm/khugepaged.c
+++ b/tools/testing/selftests/mm/khugepaged.c
@@ -618,7 +618,7 @@ static bool wait_for_scan(const char *msg, char *p, size_t len,
 		usleep(TICK);
 	}
 
-	if (!strncmp(ops->name, "anon", 4))
+	if (is_anon(ops))
 		madvise(p, len, MADV_NOHUGEPAGE);
 
 	return timeout == -1;
-- 
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}


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

end of thread, other threads:[~2026-09-23 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 11:01 [PATCH] kselftest: mm: use helper to identify anon_ops in khugepaged test Yeoreum Yun
2026-09-23 13:54 ` David Hildenbrand (Arm)
2026-09-23 15:20   ` Yeoreum Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®