]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests/mm: fix build warnings on ppc64
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 21 May 2024 03:02:19 +0000 (13:02 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:47:43 +0000 (13:47 +0200)
commit 1901472fa880e5706f90926cd85a268d2d16bf84 upstream.

Fix warnings like:

  In file included from uffd-unit-tests.c:8:
  uffd-unit-tests.c: In function `uffd_poison_handle_fault':
  uffd-common.h:45:33: warning: format `%llu' expects argument of type
  `long long unsigned int', but argument 3 has type `__u64' {aka `long
  unsigned int'} [-Wformat=]

By switching to unsigned long long for u64 for ppc64 builds.

Link: https://lkml.kernel.org/r/20240521030219.57439-1-mpe@ellerman.id.au
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/mm/gup_test.c
tools/testing/selftests/mm/uffd-common.h

index 18a49c70d4c6354baac96073bc99446ad70b0b85..7821cf45c323b95e6ab19ef97a36ea2eb51340de 100644 (file)
@@ -1,3 +1,4 @@
+#define __SANE_USERSPACE_TYPES__ // Use ll64
 #include <fcntl.h>
 #include <errno.h>
 #include <stdio.h>
index 1f0d573f306751ba4f361ececc37002b594c5eb4..2832669bd9fd54767abdb5587da07e32dc16525d 100644 (file)
@@ -8,6 +8,7 @@
 #define __UFFD_COMMON_H__
 
 #define _GNU_SOURCE
+#define __SANE_USERSPACE_TYPES__ // Use ll64
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>