diff options
| author | John Hubbard <jhubbard@nvidia.com> | 2023-06-06 00:16:32 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-06-19 16:19:02 -0700 |
| commit | 0e14e7e9f16ffe8f0761bc627829e8bd1cb32793 (patch) | |
| tree | c5589a0dc0c0473881e077d6529d461f11af42bf /tools/perf/scripts/python/stackcollapse.py | |
| parent | 7bddd2263e3781429f72f05e59fdf5e531e0bf26 (diff) | |
| download | linux-0e14e7e9f16ffe8f0761bc627829e8bd1cb32793.tar.gz linux-0e14e7e9f16ffe8f0761bc627829e8bd1cb32793.zip | |
selftests/mm: fix two -Wformat-security warnings in uffd builds
The uffd tests generate two compile time warnings from clang's
-Wformat-security setting. These trigger at the call sites for
uffd_test_start() and uffd_test_skip().
1) Fix the uffd_test_start() issue by removing the intermediate
test_name variable (thanks to David Hildenbrand for showing how to do
this).
2) Fix the uffd_test_skip() issue by observing that there is no need for
a macro and a variable args approach, because all callers of
uffd_test_skip() pass in a simple char* string, without any format
specifiers. So just change uffd_test_skip() into a regular C function.
Link: https://lkml.kernel.org/r/20230606071637.267103-7-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
