aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
diff options
context:
space:
mode:
authorLisa Nguyen <lisa@xenapiadmin.com>2013-10-20 22:53:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-26 20:12:19 -0700
commit1e27138bae529a219f5213fdf60900fae7fec1b9 (patch)
tree8b2f157be0352a68ae6583078fcb4087c18faf70 /drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
parentStaging: sb105x: Fix a possible null dereference (diff)
downloadlinux-dev-1e27138bae529a219f5213fdf60900fae7fec1b9.tar.xz
linux-dev-1e27138bae529a219f5213fdf60900fae7fec1b9.zip
staging: lustre: Remove typedef and update cfs_hash_bucket struct
Remove typedef keyword and rename the cfs_hash_bucket_t struct to cfs_hash_bucket in libcfs_hash.h. These changes resolve the "Do not add new typedefs" warning generated by checkpatch.pl and meet kernel coding style. The struct variables in hash.c are updated to reflect this change as well. Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index b06505d8620d..26c10d985dd3 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -97,20 +97,20 @@ union cfs_hash_lock {
* which depends on requirement of user
* - some extra bytes (caller can require it while creating hash)
*/
-typedef struct cfs_hash_bucket {
+struct cfs_hash_bucket {
union cfs_hash_lock hsb_lock; /**< bucket lock */
__u32 hsb_count; /**< current entries */
__u32 hsb_version; /**< change version */
unsigned int hsb_index; /**< index of bucket */
int hsb_depmax; /**< max depth on bucket */
long hsb_head[0]; /**< hash-head array */
-} cfs_hash_bucket_t;
+};
/**
* cfs_hash bucket descriptor, it's normally in stack of caller
*/
typedef struct cfs_hash_bd {
- cfs_hash_bucket_t *bd_bucket; /**< address of bucket */
+ struct cfs_hash_bucket *bd_bucket; /**< address of bucket */
unsigned int bd_offset; /**< offset in bucket */
} cfs_hash_bd_t;
@@ -221,7 +221,7 @@ typedef struct cfs_hash {
/** hash list operations */
struct cfs_hash_hlist_ops *hs_hops;
/** hash buckets-table */
- cfs_hash_bucket_t **hs_buckets;
+ struct cfs_hash_bucket **hs_buckets;
/** total number of items on this hash-table */
atomic_t hs_count;
/** hash flags, see cfs_hash_tag for detail */
@@ -255,7 +255,7 @@ typedef struct cfs_hash {
/** refcount on this hash table */
atomic_t hs_refcount;
/** rehash buckets-table */
- cfs_hash_bucket_t **hs_rehash_buckets;
+ struct cfs_hash_bucket **hs_rehash_buckets;
#if CFS_HASH_DEBUG_LEVEL >= CFS_HASH_DEBUG_1
/** serialize debug members */
spinlock_t hs_dep_lock;
@@ -451,7 +451,7 @@ cfs_hash_is_iterating(cfs_hash_t *hs)
static inline int
cfs_hash_bkt_size(cfs_hash_t *hs)
{
- return offsetof(cfs_hash_bucket_t, hsb_head[0]) +
+ return offsetof(struct cfs_hash_bucket, hsb_head[0]) +
hs->hs_hops->hop_hhead_size(hs) * CFS_HASH_BKT_NHLIST(hs) +
hs->hs_extra_bytes;
}