diff options
| author | Madhavan Srinivasan <[email protected]> | 2025-04-28 13:19:34 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-05-08 06:39:41 +0000 |
| commit | 22adb528621ddc92f887882a658507fbf88a5214 (patch) | |
| tree | 210e16a6338b982ad2398c7cd6af34cf0d90f856 /drivers/fpga/tests/fpga-mgr-test.c | |
| parent | mm: vmalloc: support more granular vrealloc() sizing (diff) | |
| download | kernel-22adb528621ddc92f887882a658507fbf88a5214.tar.gz kernel-22adb528621ddc92f887882a658507fbf88a5214.zip | |
selftests/mm: fix build break when compiling pkey_util.c
Commit 50910acd6f615 ("selftests/mm: use sys_pkey helpers consistently")
added a pkey_util.c to refactor some of the protection_keys functions
accessible by other tests. But this broken the build in powerpc in two
ways,
pkey-powerpc.h: In function `arch_is_powervm':
pkey-powerpc.h:73:21: error: storage size of `buf' isn't known
73 | struct stat buf;
| ^~~
pkey-powerpc.h:75:14: error: implicit declaration of function `stat'; did you mean `strcat'? [-Wimplicit-function-declaration]
75 | if ((stat("/sys/firmware/devicetree/base/ibm,partition-name", &buf) == 0) &&
| ^~~~
| strcat
Since pkey_util.c includes pkeys-helper.h, which in turn includes pkeys-powerpc.h,
stat.h including is missing for "struct stat". This is fixed by adding "sys/stat.h"
in pkeys-powerpc.h
Secondly,
pkey-powerpc.h:55:18: warning: format `%llx' expects argument of type `long long unsigned int', but argument 3 has type `u64' {aka `long unsigned int'} [-Wformat=]
55 | dprintf4("%s() changing %016llx to %016llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56 | __func__, __read_pkey_reg(), pkey_reg);
| ~~~~~~~~~~~~~~~~~
| |
| u64 {aka long unsigned int}
pkey-helpers.h:63:32: note: in definition of macro `dprintf_level'
63 | sigsafe_printf(args); \
| ^~~~
These format specifier related warning are removed by adding
"__SANE_USERSPACE_TYPES__" to pkeys_utils.c.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 50910acd6f61 ("selftests/mm: use sys_pkey helpers consistently")
Signed-off-by: Madhavan Srinivasan <[email protected]>
Signed-off-by: Nysal Jan K.A. <[email protected]>
Tested-by: Venkat Rao Bagalkote <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-mgr-test.c')
0 files changed, 0 insertions, 0 deletions
