mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kselftest: alloc_tag: use the ll64 types on powerpc64
@ 2026-11-03 15:54 Sasha Levin
  2026-11-04  1:10 ` Hao Ge
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-11-03 15:54 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: Hao Ge, Shuah Khan, linux-mm, linux-kselftest, linux-kernel

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.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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(+)

diff --git a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
index 74fd64b2370cc..18c761fecfde0 100644
--- a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
+++ b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
@@ -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
-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest: alloc_tag: use the ll64 types on powerpc64
  2026-11-03 15:54 [PATCH] kselftest: alloc_tag: use the ll64 types on powerpc64 Sasha Levin
@ 2026-11-04  1:10 ` Hao Ge
  2026-11-04  1:15   ` Suren Baghdasaryan
  0 siblings, 1 reply; 3+ messages in thread
From: Hao Ge @ 2026-11-04  1:10 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Shuah Khan, linux-mm, linux-kselftest, linux-kernel, Suren Baghdasaryan



On 2026/11/3 23:54, Sasha Levin wrote:
> 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.
> 
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Acked-by: Hao Ge <hao.ge@linux.dev>

> ---
> 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(+)
> 
> diff --git a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> index 74fd64b2370cc..18c761fecfde0 100644
> --- a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> +++ b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest: alloc_tag: use the ll64 types on powerpc64
  2026-11-04  1:10 ` Hao Ge
@ 2026-11-04  1:15   ` Suren Baghdasaryan
  0 siblings, 0 replies; 3+ messages in thread
From: Suren Baghdasaryan @ 2026-11-04  1:15 UTC (permalink / raw)
  To: Hao Ge; +Cc: Sasha Levin, Shuah Khan, linux-mm, linux-kselftest, linux-kernel

On Tue, Nov 3, 2026 at 5:09 PM Hao Ge <hao.ge@linux.dev> wrote:
>
>
>
> On 2026/11/3 23:54, Sasha Levin wrote:
> > 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.
> >
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> Acked-by: Hao Ge <hao.ge@linux.dev>

Acked-by: Suren Baghdasaryan <surenb@google.com>

>
> > ---
> > 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(+)
> >
> > diff --git a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> > index 74fd64b2370cc..18c761fecfde0 100644
> > --- a/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> > +++ b/tools/testing/selftests/alloc_tag/allocinfo_ioctl_test.c
> > @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-04  1:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 15:54 [PATCH] kselftest: alloc_tag: use the ll64 types on powerpc64 Sasha Levin
2026-11-04  1:10 ` Hao Ge
2026-11-04  1:15   ` Suren Baghdasaryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®