Skip to content

Commit

Permalink
selftests/mm: fix build warnings on ppc64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Ellerman authored and Andrew Morton committed May 24, 2024
1 parent b1480ed commit 1901472
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/mm/gup_test.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define __SANE_USERSPACE_TYPES__ // Use ll64
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
Expand Down
1 change: 1 addition & 0 deletions tools/testing/selftests/mm/uffd-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1901472

Please sign in to comment.