]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: irda: Remove typedef struct
authorHaneen Mohammed <hamohammed.sa@gmail.com>
Thu, 14 Sep 2017 04:55:38 +0000 (22:55 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 09:50:40 +0000 (11:50 +0200)
commitb351fa3ce6d858b7bb4183a12915eaf6f5c8b630
tree91f0e1601b996a8dd18212d0636575c646a421a9
parentf952ec5f429cf961e1a812591a39c6c5c5852c9c
staging: irda: Remove typedef struct

This patch remove typedef from a structure with all its ocurrences
since using typedefs for structures is discouraged.
Issue found using Coccinelle:

@r1@
type T;
@@

typedef struct { ... } T;

@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t" or T[-2:] == "_T":
coccinelle.T2 = T[:-2];
else:
coccinelle.T2 = T;

print T, coccinelle.T2

@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;

@r3@
type r1.T;
identifier c1.T2;
@@
-T
+struct T2

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/irda/include/net/irda/qos.h