Merge remote-tracking branch 'spi/topic/xilinx' into spi-next
[firefly-linux-kernel-4.4.55.git] / lib / rhashtable.c
index e6940cf16628275ad7e1a58a7d1103da31f8f7d7..7b36e4d40ed7e3a1e0e1ddb87f386768c8b256aa 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/hash.h>
 #include <linux/random.h>
 #include <linux/rhashtable.h>
-#include <linux/log2.h>
 
 #define HASH_DEFAULT_SIZE      64UL
 #define HASH_MIN_SIZE          4UL
@@ -38,16 +37,10 @@ int lockdep_rht_mutex_is_held(const struct rhashtable *ht)
 EXPORT_SYMBOL_GPL(lockdep_rht_mutex_is_held);
 #endif
 
-/**
- * rht_obj - cast hash head to outer object
- * @ht:                hash table
- * @he:                hashed node
- */
-void *rht_obj(const struct rhashtable *ht, const struct rhash_head *he)
+static void *rht_obj(const struct rhashtable *ht, const struct rhash_head *he)
 {
        return (void *) he - ht->p.head_offset;
 }
-EXPORT_SYMBOL_GPL(rht_obj);
 
 static u32 __hashfn(const struct rhashtable *ht, const void *key,
                      u32 len, u32 hsize)
@@ -386,7 +379,7 @@ EXPORT_SYMBOL_GPL(rhashtable_insert);
  * deletion when combined with walking or lookup.
  */
 void rhashtable_remove_pprev(struct rhashtable *ht, struct rhash_head *obj,
-                            struct rhash_head **pprev, gfp_t flags)
+                            struct rhash_head __rcu **pprev, gfp_t flags)
 {
        struct bucket_table *tbl = rht_dereference(ht->tbl, ht);