Skip to content

Commit

Permalink
lib/generic-radix-tree.c: remove unneeded __rcu
Browse files Browse the repository at this point in the history
struct __genradix is defined as having its member 'root'
annotated as __rcu. But in the corresponding API RCU is not used.
Sparse reports this type mismatch as:
	lib/generic-radix-tree.c:56:35: warning: incorrect type in initializer (different address spaces)
	lib/generic-radix-tree.c:56:35:    expected struct genradix_root *r
	lib/generic-radix-tree.c:56:35:    got struct genradix_root [noderef] <asn:4> *__val
with 6 other ones.

So, correct root's type by removing this unneeded __rcu.

Signed-off-by: Luc Van Oostenryck <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Kent Overstreet <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
lucvoo authored and torvalds committed Aug 12, 2020
1 parent bcb32a1 commit 0a650e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/generic-radix-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
struct genradix_root;

struct __genradix {
struct genradix_root __rcu *root;
struct genradix_root *root;
};

/*
Expand Down

0 comments on commit 0a650e4

Please sign in to comment.