datapath: Fix flow table sparse RCU annotations.
authorJesse Gross <jesse@nicira.com>
Thu, 17 Nov 2011 00:01:32 +0000 (16:01 -0800)
committerJesse Gross <jesse@nicira.com>
Thu, 17 Nov 2011 00:10:45 +0000 (16:10 -0800)
Some overzealous marking of pointers as __rcu caused sparse to flag
errors.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c
datapath/flow.c

index 317c404a908dbd131cff38db928763638e5c5164..44d31a838eeca0d4773be7c2560d472148a776b0 100644 (file)
@@ -249,7 +249,7 @@ static void destroy_dp_rcu(struct rcu_head *rcu)
 {
        struct datapath *dp = container_of(rcu, struct datapath, rcu);
 
-       flow_tbl_destroy(dp->table);
+       flow_tbl_destroy((__force struct flow_table *)dp->table);
        free_percpu(dp->stats_percpu);
        kobject_put(&dp->ifobj);
 }
index 9a0df45d8ed7e55aed91d4dff30ce15ac61ad521..644a377fa652ea553d279868c879831112b87f11 100644 (file)
@@ -288,15 +288,15 @@ struct sw_flow *flow_alloc(void)
        return flow;
 }
 
-static struct hlist_head __rcu *find_bucket(struct flow_table * table, u32 hash)
+static struct hlist_head *find_bucket(struct flow_table *table, u32 hash)
 {
        return flex_array_get(table->buckets,
                                (hash & (table->n_buckets - 1)));
 }
 
-static struct flex_array  __rcu *alloc_buckets(unsigned int n_buckets)
+static struct flex_array *alloc_buckets(unsigned int n_buckets)
 {
-       struct flex_array  __rcu *buckets;
+       struct flex_array *buckets;
        int i, err;
 
        buckets = flex_array_alloc(sizeof(struct hlist_head *),