* [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx
@ 2024-07-30 12:18 Uros Bizjak
2024-07-30 13:18 ` Jan Kara
2024-07-30 14:10 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Uros Bizjak @ 2024-07-30 12:18 UTC (permalink / raw)
To: linux-aio, linux-fsdevel, linux-kernel
Cc: Uros Bizjak, Benjamin LaHaise, Alexander Viro, Christian Brauner,
Jan Kara, Andrew Morton
__percpu annotation of *cpu pointer in struct kioctx is put at
the wrong place, resulting in several sparse warnings:
aio.c:623:24: warning: incorrect type in argument 1 (different address spaces)
aio.c:623:24: expected void [noderef] __percpu *__pdata
aio.c:623:24: got struct kioctx_cpu *cpu
aio.c:788:18: warning: incorrect type in assignment (different address spaces)
aio.c:788:18: expected struct kioctx_cpu *cpu
aio.c:788:18: got struct kioctx_cpu [noderef] __percpu *
aio.c:835:24: warning: incorrect type in argument 1 (different address spaces)
aio.c:835:24: expected void [noderef] __percpu *__pdata
aio.c:835:24: got struct kioctx_cpu *cpu
aio.c:940:16: warning: incorrect type in initializer (different address spaces)
aio.c:940:16: expected void const [noderef] __percpu *__vpp_verify
aio.c:940:16: got struct kioctx_cpu *
aio.c:958:16: warning: incorrect type in initializer (different address spaces)
aio.c:958:16: expected void const [noderef] __percpu *__vpp_verify
aio.c:958:16: got struct kioctx_cpu *
Put __percpu annotation at the right place to fix these warnings.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
fs/aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 6066f64967b3..e8920178b50f 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -100,7 +100,7 @@ struct kioctx {
unsigned long user_id;
- struct __percpu kioctx_cpu *cpu;
+ struct kioctx_cpu __percpu *cpu;
/*
* For percpu reqs_available, number of slots we move to/from global
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx
2024-07-30 12:18 [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx Uros Bizjak
@ 2024-07-30 13:18 ` Jan Kara
2024-07-30 14:10 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2024-07-30 13:18 UTC (permalink / raw)
To: Uros Bizjak
Cc: linux-aio, linux-fsdevel, linux-kernel, Benjamin LaHaise,
Alexander Viro, Christian Brauner, Jan Kara, Andrew Morton
On Tue 30-07-24 14:18:34, Uros Bizjak wrote:
> __percpu annotation of *cpu pointer in struct kioctx is put at
> the wrong place, resulting in several sparse warnings:
>
> aio.c:623:24: warning: incorrect type in argument 1 (different address spaces)
> aio.c:623:24: expected void [noderef] __percpu *__pdata
> aio.c:623:24: got struct kioctx_cpu *cpu
> aio.c:788:18: warning: incorrect type in assignment (different address spaces)
> aio.c:788:18: expected struct kioctx_cpu *cpu
> aio.c:788:18: got struct kioctx_cpu [noderef] __percpu *
> aio.c:835:24: warning: incorrect type in argument 1 (different address spaces)
> aio.c:835:24: expected void [noderef] __percpu *__pdata
> aio.c:835:24: got struct kioctx_cpu *cpu
> aio.c:940:16: warning: incorrect type in initializer (different address spaces)
> aio.c:940:16: expected void const [noderef] __percpu *__vpp_verify
> aio.c:940:16: got struct kioctx_cpu *
> aio.c:958:16: warning: incorrect type in initializer (different address spaces)
> aio.c:958:16: expected void const [noderef] __percpu *__vpp_verify
> aio.c:958:16: got struct kioctx_cpu *
>
> Put __percpu annotation at the right place to fix these warnings.
>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Cc: Benjamin LaHaise <bcrl@kvack.org>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> Cc: Christian Brauner <brauner@kernel.org>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Andrew Morton <akpm@linux-foundation.org>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/aio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index 6066f64967b3..e8920178b50f 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -100,7 +100,7 @@ struct kioctx {
>
> unsigned long user_id;
>
> - struct __percpu kioctx_cpu *cpu;
> + struct kioctx_cpu __percpu *cpu;
>
> /*
> * For percpu reqs_available, number of slots we move to/from global
> --
> 2.45.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx
2024-07-30 12:18 [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx Uros Bizjak
2024-07-30 13:18 ` Jan Kara
@ 2024-07-30 14:10 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2024-07-30 14:10 UTC (permalink / raw)
To: Uros Bizjak
Cc: Christian Brauner, Benjamin LaHaise, Alexander Viro, Jan Kara,
Andrew Morton, linux-aio, linux-fsdevel, linux-kernel
On Tue, 30 Jul 2024 14:18:34 +0200, Uros Bizjak wrote:
> __percpu annotation of *cpu pointer in struct kioctx is put at
> the wrong place, resulting in several sparse warnings:
>
> aio.c:623:24: warning: incorrect type in argument 1 (different address spaces)
> aio.c:623:24: expected void [noderef] __percpu *__pdata
> aio.c:623:24: got struct kioctx_cpu *cpu
> aio.c:788:18: warning: incorrect type in assignment (different address spaces)
> aio.c:788:18: expected struct kioctx_cpu *cpu
> aio.c:788:18: got struct kioctx_cpu [noderef] __percpu *
> aio.c:835:24: warning: incorrect type in argument 1 (different address spaces)
> aio.c:835:24: expected void [noderef] __percpu *__pdata
> aio.c:835:24: got struct kioctx_cpu *cpu
> aio.c:940:16: warning: incorrect type in initializer (different address spaces)
> aio.c:940:16: expected void const [noderef] __percpu *__vpp_verify
> aio.c:940:16: got struct kioctx_cpu *
> aio.c:958:16: warning: incorrect type in initializer (different address spaces)
> aio.c:958:16: expected void const [noderef] __percpu *__vpp_verify
> aio.c:958:16: got struct kioctx_cpu *
>
> [...]
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx
https://git.kernel.org/vfs/vfs/c/b484eca083f7
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-30 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30 12:18 [PATCH] fs/aio: Fix __percpu annotation of *cpu pointer in struct kioctx Uros Bizjak
2024-07-30 13:18 ` Jan Kara
2024-07-30 14:10 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox