diff options
author | Axel Rasmussen <[email protected]> | 2020-12-14 19:13:58 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-12-15 12:13:46 -0800 |
commit | 77f962e7ae24e5fa7b257b8242c62e716119a312 (patch) | |
tree | 9a1a1047b75e62c08f3c4b3e8d120ace31463478 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | d0d4730ac2e404a5b0da9a87ef38c73e51cb1664 (diff) |
userfaultfd: selftests: make __{s,u}64 format specifiers portable
On certain platforms (powerpcle is the one on which I ran into this),
"%Ld" and "%Lu" are unsuitable for printing __s64 and __u64, respectively,
resulting in build warnings. Cast to {u,}int64_t, and use the PRI{d,u}64
macros defined in inttypes.h to print them. This ought to be portable to
all platforms.
Splitting this off into a separate macro lets us remove some lines, and
get rid of some (I would argue) stylistically odd cases where we joined
printf() and exit() into a single statement with a ,.
Finally, this also fixes a "missing braces around initializer" warning
when we initialize prms in wp_range().
[[email protected]: v2]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Axel Rasmussen <[email protected]>
Acked-by: Peter Xu <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: David Alan Gilbert <[email protected]>
Cc: Greg Thelen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions