Staging: lustre: Remove typedef ldlm_ns_hash_def_t
authorVaishali Thakkar <vthakkar1994@gmail.com>
Mon, 20 Oct 2014 08:28:35 +0000 (13:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2014 03:09:11 +0000 (11:09 +0800)
commit38d676da615ac1a0b37572ac31ac8c7573f7dcfd
tree76b5c802dfc9fe83ed87113bbfede0040887a83e
parent0951252522bfdb71f35bc4ea99c0739bb883c4ca
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>
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c