staging: lusture: lnet: Replace typedef with struct
PATCH 1/1 staging: lusture: lnet: Replace typedef with struct
As per the Linux kernel coding style guidelines, using typedef for a structure type is not recommended. Hence, occurences of typedefs have been removed.
This was done with Coccinelle.
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
coccinelle.T2 = T;
@@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
@@ type r1.T;
identifier c1.T2;
@@
-T
+ struct T2
The '_t' suffix has not been removed since there is a variable with the same name.
Signed-off-by Bhaktipriya Shridhar <[email protected]>
--- drivers/staging/lustre/lnet/selftest/ping_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/lustre/lnet/selftest/ping_test.c +3 -3
@@ -48,12 +48,12 @@ static int ping_srv_workitems = SFW_TEST_WI_MAX;module_param (ping_srv_workitems, int,0644 );MODULE_PARM_DESC (ping_srv_workitems,"# PING server workitems" ); -typedef struct { +struct lst_ping_data_t {spinlock_t pnd_lock;/* serialize */ int pnd_counter;/* sequence counter */ -}lst_ping_data_t ; +}; -static lst_ping_data_t lst_ping_data; +static struct lst_ping_data_t lst_ping_data;static int ping_client_init (sfw_test_instance_t *tsi)
--
2.1.4