selftests/mm: ensure non-global pkey symbols are marked static
authorKevin Brodsky <kevin.brodsky@arm.com>
Mon, 9 Dec 2024 09:50:15 +0000 (09:50 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:40:55 +0000 (22:40 -0800)
commitb0cc298487d9fa61fb3198b2d1bd0839b3c4c95d
tree0ae6e95c2d6266d7db1aaca8882ea8655cdcc9e3
parentf3f555974c19ede667b1fbe67b3236beea474099
selftests/mm: ensure non-global pkey symbols are marked static

The pkey tests define a whole lot of functions and some global variables.
A few are truly global (declared in pkey-helpers.h), but the majority are
file-scoped.  Make sure those are labelled static.

Some of the pkey_{access,write}_{allow,deny} helpers are not called, or
only called when building for some architectures.  Mark them
__maybe_unused to suppress compiler warnings.

Link: https://lkml.kernel.org/r/20241209095019.1732120-11-kevin.brodsky@arm.com
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Keith Lucas <keith.lucas@oracle.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/pkey-helpers.h
tools/testing/selftests/mm/pkey_sighandler_tests.c
tools/testing/selftests/mm/protection_keys.c