Staging: lustre: Remove typedefs
PATCH v2 1/1 Staging: lustre: Remove typedefs
WARNING:do not add new typedefs.Remove typedefs,the names of the renamed types changed.
That was found by running checkpatch.
---
v2:the names of the renamed types changed and changed the subject line and description
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +7 -7
@@ -272,7 +272,7 @@ struct cfs_hash {char hs_name[0 ]; }; -typedef struct cfs_hash_lock_ops { +struct cfs_hash_lock_ops {/** lock the hash table */ void (*hs_lock)(union cfs_hash_lock *lock,int exclusive);/** unlock the hash table */
@@ -281,9 +281,9 @@ typedef struct cfs_hash_lock_ops {void (*hs_bkt_lock)(union cfs_hash_lock *lock,int exclusive);/** unlock the hash bucket */ void (*hs_bkt_unlock)(union cfs_hash_lock *lock,int exclusive); -} cfs_hash_lock_ops_t; +}; -typedef struct cfs_hash_hlist_ops { +struct cfs_hash_hlist_ops {/** return hlist_head of hash-head of @bd */ struct hlist_head *(*hop_hhead)(struct cfs_hash *hs,struct cfs_hash_bd *bd);/** return hash-head size */
@@ -294,9 +294,9 @@ typedef struct cfs_hash_hlist_ops {/** remove @hnode from hash-head of @bd */ int (*hop_hnode_del)(struct cfs_hash *hs,struct cfs_hash_bd *bd,struct hlist_node *hnode); -} cfs_hash_hlist_ops_t; +}; -typedef struct cfs_hash_ops { +struct cfs_hash_ops {/** return hashed value from @key */ unsigned (*hs_hash)(struct cfs_hash *hs,const void *key,unsigned mask);/** return key address of @hnode */
@@ -318,7 +318,7 @@ typedef struct cfs_hash_ops {void (*hs_put_locked)(struct cfs_hash *hs,struct hlist_node *hnode);/** it's called before removing of @hnode */ void (*hs_exit)(struct cfs_hash *hs,struct hlist_node *hnode); -} cfs_hash_ops_t; +};/** total number of buckets in @hs */ #define CFS_HASH_NBKT (hs) \
@@ -671,7 +671,7 @@ struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs,struct cfs_hash *cfs_hash_create (char *name,unsigned cur_bits,unsigned max_bits,unsigned bkt_bits,unsigned extra_bytes,unsigned min_theta,unsigned max_theta, -cfs_hash_ops_t *ops,unsigned flags); +cfs_hash_ops *ops,unsigned flags);struct cfs_hash *cfs_hash_getref (struct cfs_hash *hs);void cfs_hash_putref (struct cfs_hash *hs);
Signature · 1 line
1.8.3.2
Quoted 59 lines · Melike Yurtoglu
WARNING:do not add new typedefs.Remove typedefs,the names of the renamed types changed.
That was found by running checkpatch.Signed-off-by Melike Yurtoglu <[email protected]>---
v2:the names of the renamed types changed and changed the subject line and description
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +6
-6@@ -272,7 +272,7 @@ struct cfs_hash {char hs_name[0 ]; }; -typedef struct cfs_hash_lock_ops { +struct cfs_hash_lock_ops {/** lock the hash table */ void (*hs_lock)(union cfs_hash_lock *lock,int exclusive);/** unlock the hash table */ @@ -281,9 +281,9 @@ typedef struct cfs_hash_lock_ops {void (*hs_bkt_lock)(union cfs_hash_lock *lock,int exclusive);/** unlock the hash bucket */ void (*hs_bkt_unlock)(union cfs_hash_lock *lock,int exclusive); -} cfs_hash_lock_ops_t; +}; -typedef struct cfs_hash_hlist_ops { +struct cfs_hash_hlist_ops {/** return hlist_head of hash-head of @bd */ struct hlist_head *(*hop_hhead)(struct cfs_hash *hs,struct cfs_hash_bd *bd);/** return hash-head size */ @@ -294,9 +294,9 @@ typedef struct cfs_hash_hlist_ops {/** remove @hnode from hash-head of @bd */ int (*hop_hnode_del)(struct cfs_hash *hs,struct cfs_hash_bd *bd,struct hlist_node *hnode); -} cfs_hash_hlist_ops_t; +}; -typedef struct cfs_hash_ops { +struct cfs_hash_ops {/** return hashed value from @key */ unsigned (*hs_hash)(struct cfs_hash *hs,const void *key,unsigned mask);/** return key address of @hnode */ @@ -318,7 +318,7 @@ typedef struct cfs_hash_ops {void (*hs_put_locked)(struct cfs_hash *hs,struct hlist_node *hnode);/** it's called before removing of @hnode */ void (*hs_exit)(struct cfs_hash *hs,struct hlist_node *hnode); -} cfs_hash_ops_t; +};/** total number of buckets in @hs */ #define CFS_HASH_NBKT (hs) \
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs, · line 674
Quoted 5 lines
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +1
-1@@ -671,7 +671,7 @@ struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs,struct cfs_hash *cfs_hash_create (char *name,unsigned cur_bits,unsigned max_bits,unsigned bkt_bits,unsigned extra_bytes,unsigned min_theta,unsigned max_theta, -cfs_hash_ops_t *ops,unsigned flags); +cfs_hash_ops *ops,unsigned flags);
This looks incorrect. The type is now struct cfs_hash_ops.
Are these types used in no other files? The compiler should tell you but it could be good to check with grep as well.
julia