rculfhash: remove unneeded conversion
authorLai Jiangshan <laijs@cn.fujitsu.com>
Wed, 21 Dec 2011 14:29:12 +0000 (09:29 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Dec 2011 14:29:12 +0000 (09:29 -0500)
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index c1ff314bc0d5cc748e1329d8508f72641ae804ad..958982bf40a420f4c8d15103591d3e8ce8c79524 100644 (file)
@@ -1471,7 +1471,7 @@ void cds_lfht_add(struct cds_lfht *ht, unsigned long hash,
 {
        unsigned long size;
 
-       node->reverse_hash = bit_reverse_ulong((unsigned long) hash);
+       node->reverse_hash = bit_reverse_ulong(hash);
        size = rcu_dereference(ht->size);
        _cds_lfht_add(ht, NULL, NULL, size, node, NULL, 0);
        ht_count_add(ht, size, hash);
@@ -1486,7 +1486,7 @@ struct cds_lfht_node *cds_lfht_add_unique(struct cds_lfht *ht,
        unsigned long size;
        struct cds_lfht_iter iter;
 
-       node->reverse_hash = bit_reverse_ulong((unsigned long) hash);
+       node->reverse_hash = bit_reverse_ulong(hash);
        size = rcu_dereference(ht->size);
        _cds_lfht_add(ht, match, key, size, node, &iter, 0);
        if (iter.node == node)
@@ -1503,7 +1503,7 @@ struct cds_lfht_node *cds_lfht_add_replace(struct cds_lfht *ht,
        unsigned long size;
        struct cds_lfht_iter iter;
 
-       node->reverse_hash = bit_reverse_ulong((unsigned long) hash);
+       node->reverse_hash = bit_reverse_ulong(hash);
        size = rcu_dereference(ht->size);
        for (;;) {
                _cds_lfht_add(ht, match, key, size, node, &iter, 0);
@@ -1526,7 +1526,7 @@ int cds_lfht_replace(struct cds_lfht *ht,
 {
        unsigned long size;
 
-       new_node->reverse_hash = bit_reverse_ulong((unsigned long) hash);
+       new_node->reverse_hash = bit_reverse_ulong(hash);
        if (!old_iter->node)
                return -ENOENT;
        if (caa_unlikely(old_iter->node->reverse_hash != new_node->reverse_hash))
This page took 0.026421 seconds and 4 git commands to generate.