OSDN Git Service

include/linux/relay.h: fix percpu annotation in struct rchan
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Fri, 8 Mar 2019 00:31:28 +0000 (16:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:29:06 +0000 (22:29 +0200)
commit553be48d7459b569a83e676daaa6ba69f32cf288
tree2d17cbb3617b79eb5e2d538bad233890e56f22ae
parent8b1e0dd613cad7597f5d4bdba9e7c44957dbdf8a
include/linux/relay.h: fix percpu annotation in struct rchan

[ Upstream commit 62461ac2e5b6520b6d65fc6d7d7b4b8df4b848d8 ]

The percpu member of this structure is declared as:
struct ... ** __percpu member;
So its type is:
__percpu pointer to pointer to struct ...

But looking at how it's used, its type should be:
pointer to __percpu pointer to struct ...
and it should thus be declared as:
struct ... * __percpu *member;

So fix the placement of '__percpu' in the definition of this
structures.

This silents a few Sparse's warnings like:
warning: incorrect type in initializer (different address spaces)
  expected void const [noderef] <asn:3> *__vpp_verify
  got struct sched_domain **

Link: http://lkml.kernel.org/r/20190118144902.79065-1-luc.vanoostenryck@gmail.com
Fixes: 017c59c042d01 ("relay: Use per CPU constructs for the relay channel buffer pointers")
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Jens Axboe <axboe@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/relay.h