Skip to content

Commit

Permalink
ieee802154: hwsim: fix rcu address annotation
Browse files Browse the repository at this point in the history
This patch fixes the following sparse warning about mismatch rcu
attribute for address space annotation:

...
error: incompatible types in comparison expression (different modifiers)
error: incompatible types in comparison expression (different address spaces)
...

Some __rcu annotation was at non-pointers list head structures and one was
missing in edge information which is used by rcu_assign_pointer() to
update edge setting information.

Cc: Stefan Schmidt <stefan@datenfreihafen.org>
Fixes: f25da51 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Aring authored and David S. Miller committed Aug 7, 2018
1 parent de7de57 commit c5d99d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ieee802154/mac802154_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");
static LIST_HEAD(hwsim_phys);
static DEFINE_MUTEX(hwsim_phys_lock);

static __rcu LIST_HEAD(hwsim_ifup_phys);
static LIST_HEAD(hwsim_ifup_phys);

static struct platform_device *mac802154hwsim_dev;

Expand Down Expand Up @@ -68,7 +68,7 @@ struct hwsim_edge_info {

struct hwsim_edge {
struct hwsim_phy *endpoint;
struct hwsim_edge_info *info;
struct hwsim_edge_info __rcu *info;

struct list_head list;
struct rcu_head rcu;
Expand All @@ -81,7 +81,7 @@ struct hwsim_phy {
struct hwsim_pib __rcu *pib;

bool suspended;
struct list_head __rcu edges;
struct list_head edges;

struct list_head list;
struct list_head list_ifup;
Expand Down

0 comments on commit c5d99d2

Please sign in to comment.