linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] selftests/mm: mkdirty: Fix incorrect position of #endif
@ 2023-07-12 13:46 Colin Ian King
  2023-07-12 19:10 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-07-12 13:46 UTC (permalink / raw)
  To: Andrew Morton, Shuah Khan, David Hildenbrand, linux-mm,
	linux-kselftest
  Cc: kernel-janitors, linux-kernel

The #endif is the wrong side of a } causing a build failure when
__NR_userfaultfd is not defined. Fix this by moving the #end to
enclose the }

Fixes: 9eac40fc0cc7 ("selftests/mm: mkdirty: test behavior of (pte|pmd)_mkdirty on VMAs without write permissions")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 tools/testing/selftests/mm/mkdirty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c
index 6d71d972997b..301abb99e027 100644
--- a/tools/testing/selftests/mm/mkdirty.c
+++ b/tools/testing/selftests/mm/mkdirty.c
@@ -321,8 +321,8 @@ static void test_uffdio_copy(void)
 munmap:
 	munmap(dst, pagesize);
 	free(src);
-#endif /* __NR_userfaultfd */
 }
+#endif /* __NR_userfaultfd */
 
 int main(void)
 {
-- 
2.39.2



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

end of thread, other threads:[~2023-07-12 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 13:46 [PATCH][next] selftests/mm: mkdirty: Fix incorrect position of #endif Colin Ian King
2023-07-12 19:10 ` David Hildenbrand

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