kselftest: alloc_tag: use the ll64 types on powerpc64
PATCH 1/1 kselftest: alloc_tag: use the ll64 types on powerpc64
On powerpc64 __u64 is an unsigned long unless __SANE_USERSPACE_TYPES__ is defined, so printing and scanning the __u64 fields with %llu warns:
allocinfo_ioctl_test.c:93:73: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type '__u64' {aka 'long unsigned int'} [-Wformat=]
Define __SANE_USERSPACE_TYPES__, as other selftests do.
---
KernelCI's powerpc kselftest builds show this. The define makes the same change on alpha and mips64 and none on the other architectures; the x86_64 and 32-bit builds don't change.
tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c +1 -0
@@ -1,4 +1,5 @@// SPDX-License-Identifier: GPL-2.0-only +#define __SANE_USERSPACE_TYPES__/* kselftest for allocinfo ioctl * allocinfo ioctl retrieves allocinfo data through ioctl
Signature · 1 line
2.53.0
Quoted 8 lines · Sasha Levin
On powerpc64
__u64is an unsigned long unless__SANE_USERSPACE_TYPES__is defined, so printing and scanning the__u64fields with %llu warns:allocinfo_ioctl_test.c:93:73: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type '
__u64' {aka 'long unsigned int'} [-Wformat=]Define
__SANE_USERSPACE_TYPES__, as other selftests do.Signed-off-by Sasha Levin <[email protected]>
Quoted 18 lines
---
KernelCI's powerpc kselftest builds show this. The define makes the same change on alpha and mips64 and none on the other architectures; thex86_64and 32-bit builds don't change.tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c +1
-0@@ -1,4 +1,5 @@// SPDX-License-Identifier: GPL-2.0-only +#define __SANE_USERSPACE_TYPES__/* kselftest for allocinfo ioctl * allocinfo ioctl retrieves allocinfo data through ioctl
Quoted 7 lines · Hao Ge
Quoted 3 lines · Sasha Levin
On powerpc64
__u64is an unsigned long unless__SANE_USERSPACE_TYPES__is defined, so printing and scanning the__u64fields with %llu warns:
Quoted 7 lines
Quoted 5 lines
allocinfo_ioctl_test.c:93:73: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type '
__u64' {aka 'long unsigned int'} [-Wformat=]Define
__SANE_USERSPACE_TYPES__, as other selftests do.Signed-off-by Sasha Levin <[email protected]>Acked-by Hao Ge <[email protected]>
Quoted 19 lines
Quoted 19 lines
---
KernelCI's powerpc kselftest builds show this. The define makes the same change on alpha and mips64 and none on the other architectures; thex86_64and 32-bit builds don't change.tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c +1
-0@@ -1,4 +1,5 @@// SPDX-License-Identifier: GPL-2.0-only +#define __SANE_USERSPACE_TYPES__/* kselftest for allocinfo ioctl * allocinfo ioctl retrieves allocinfo data through ioctl