linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/z3fold: Add __percpu annotation to *unbuddied pointer in struct z3fold_pool
@ 2024-07-30 12:34 Uros Bizjak
  2024-08-05  7:09 ` Miaohe Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2024-07-30 12:34 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Uros Bizjak, Vitaly Wool, Miaohe Lin, Andrew Morton

Compiling z3fold.c results in several sparse warnings:

z3fold.c:797:21: warning: incorrect type in initializer (different address spaces)
z3fold.c:797:21:    expected void const [noderef] __percpu *__vpp_verify
z3fold.c:797:21:    got struct list_head *
z3fold.c:852:37: warning: incorrect type in initializer (different address spaces)
z3fold.c:852:37:    expected void const [noderef] __percpu *__vpp_verify
z3fold.c:852:37:    got struct list_head *
z3fold.c:924:25: warning: incorrect type in assignment (different address spaces)
z3fold.c:924:25:    expected struct list_head *unbuddied
z3fold.c:924:25:    got void [noderef] __percpu *_res
z3fold.c:930:33: warning: incorrect type in initializer (different address spaces)
z3fold.c:930:33:    expected void const [noderef] __percpu *__vpp_verify
z3fold.c:930:33:    got struct list_head *
z3fold.c:949:25: warning: incorrect type in argument 1 (different address spaces)
z3fold.c:949:25:    expected void [noderef] __percpu *__pdata
z3fold.c:949:25:    got struct list_head *unbuddied
z3fold.c:979:25: warning: incorrect type in argument 1 (different address spaces)
z3fold.c:979:25:    expected void [noderef] __percpu *__pdata
z3fold.c:979:25:    got struct list_head *unbuddied

Add __percpu annotation to *unbuddied pointer to fix these warnings.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/z3fold.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index 2ebfed32871b..379d24b4fef9 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -144,7 +144,7 @@ struct z3fold_pool {
 	const char *name;
 	spinlock_t lock;
 	spinlock_t stale_lock;
-	struct list_head *unbuddied;
+	struct list_head __percpu *unbuddied;
 	struct list_head stale;
 	atomic64_t pages_nr;
 	struct kmem_cache *c_handle;
-- 
2.45.2



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

* Re: [PATCH] mm/z3fold: Add __percpu annotation to *unbuddied pointer in struct z3fold_pool
  2024-07-30 12:34 [PATCH] mm/z3fold: Add __percpu annotation to *unbuddied pointer in struct z3fold_pool Uros Bizjak
@ 2024-08-05  7:09 ` Miaohe Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Miaohe Lin @ 2024-08-05  7:09 UTC (permalink / raw)
  To: Uros Bizjak, linux-mm, linux-kernel; +Cc: Vitaly Wool, Andrew Morton

On 2024/7/30 20:34, Uros Bizjak wrote:
> Compiling z3fold.c results in several sparse warnings:
> 
> z3fold.c:797:21: warning: incorrect type in initializer (different address spaces)
> z3fold.c:797:21:    expected void const [noderef] __percpu *__vpp_verify
> z3fold.c:797:21:    got struct list_head *
> z3fold.c:852:37: warning: incorrect type in initializer (different address spaces)
> z3fold.c:852:37:    expected void const [noderef] __percpu *__vpp_verify
> z3fold.c:852:37:    got struct list_head *
> z3fold.c:924:25: warning: incorrect type in assignment (different address spaces)
> z3fold.c:924:25:    expected struct list_head *unbuddied
> z3fold.c:924:25:    got void [noderef] __percpu *_res
> z3fold.c:930:33: warning: incorrect type in initializer (different address spaces)
> z3fold.c:930:33:    expected void const [noderef] __percpu *__vpp_verify
> z3fold.c:930:33:    got struct list_head *
> z3fold.c:949:25: warning: incorrect type in argument 1 (different address spaces)
> z3fold.c:949:25:    expected void [noderef] __percpu *__pdata
> z3fold.c:949:25:    got struct list_head *unbuddied
> z3fold.c:979:25: warning: incorrect type in argument 1 (different address spaces)
> z3fold.c:979:25:    expected void [noderef] __percpu *__pdata
> z3fold.c:979:25:    got struct list_head *unbuddied
> 
> Add __percpu annotation to *unbuddied pointer to fix these warnings.
> 
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> Cc: Vitaly Wool <vitaly.wool@konsulko.com>
> Cc: Miaohe Lin <linmiaohe@huawei.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Thanks.
.


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

end of thread, other threads:[~2024-08-05  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30 12:34 [PATCH] mm/z3fold: Add __percpu annotation to *unbuddied pointer in struct z3fold_pool Uros Bizjak
2024-08-05  7:09 ` Miaohe Lin

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