diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2014-10-20 13:58:35 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-23 11:09:11 +0800 |
commit | 38d676da615ac1a0b37572ac31ac8c7573f7dcfd (patch) | |
tree | 76b5c802dfc9fe83ed87113bbfede0040887a83e /drivers | |
parent | 0951252522bfdb71f35bc4ea99c0739bb883c4ca (diff) |
Staging: lustre: Remove typedef ldlm_ns_hash_def_t
The linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for
ldlm_ns_hash_def_t. Also, the name of the struct is changed to drop
the _t, to make the name look less typedef-like.
This is done using Coccinelle. Semantic patch used to detect this
case is as follows:
@tn1@
type td;
@@
typedef struct { ... } td;
@script:python tf@
td << tn1.td;
tdres;
@@
coccinelle.tdres = td;
@@
type tn1.td;
identifier tf.tdres;
@@
-typedef
struct
+ tdres
{ ... }
-td
;
@@
type tn1.td;
identifier tf.tdres;
@@
-td
+ struct tdres
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index a785b7a7d1b3..8b20a838b7f2 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -501,7 +501,7 @@ cfs_hash_ops_t ldlm_ns_fid_hash_ops = { .hs_put = ldlm_res_hop_put }; -typedef struct { +struct ldlm_ns_hash_def { ldlm_ns_type_t nsd_type; /** hash bucket bits */ unsigned nsd_bkt_bits; @@ -509,9 +509,9 @@ typedef struct { unsigned nsd_all_bits; /** hash operations */ cfs_hash_ops_t *nsd_hops; -} ldlm_ns_hash_def_t; +}; -ldlm_ns_hash_def_t ldlm_ns_hash_defs[] = { +struct ldlm_ns_hash_def ldlm_ns_hash_defs[] = { { .nsd_type = LDLM_NS_TYPE_MDC, .nsd_bkt_bits = 11, @@ -563,7 +563,7 @@ struct ldlm_namespace *ldlm_namespace_new(struct obd_device *obd, char *name, { struct ldlm_namespace *ns = NULL; struct ldlm_ns_bucket *nsb; - ldlm_ns_hash_def_t *nsd; + struct ldlm_ns_hash_def *nsd; struct cfs_hash_bd bd; int idx; int rc; |