pcmcia: Remove typedef tuple_flags
authorHimangi Saraogi <himangi774@gmail.com>
Wed, 6 Aug 2014 12:29:48 +0000 (17:59 +0530)
committerDominik Brodowski <linux@dominikbrodowski.net>
Sat, 30 May 2015 13:50:21 +0000 (15:50 +0200)
The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for tuple_flags.

The following Coccinelle semantic patch makes the transformation.

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/cistpl.c

index 64d0515b76bd5ade5136b46a566f78d9c23ba831..facd151116b005cf02bd1a906a5fddf12e2335a9 100644 (file)
@@ -434,17 +434,17 @@ int pcmcia_replace_cis(struct pcmcia_socket *s,
 
 /* The high-level CIS tuple services */
 
-typedef struct tuple_flags {
+struct tuple_flags {
        u_int           link_space:4;
        u_int           has_link:1;
        u_int           mfc_fn:3;
        u_int           space:4;
-} tuple_flags;
+};
 
-#define LINK_SPACE(f)  (((tuple_flags *)(&(f)))->link_space)
-#define HAS_LINK(f)    (((tuple_flags *)(&(f)))->has_link)
-#define MFC_FN(f)      (((tuple_flags *)(&(f)))->mfc_fn)
-#define SPACE(f)       (((tuple_flags *)(&(f)))->space)
+#define LINK_SPACE(f)  (((struct tuple_flags *)(&(f)))->link_space)
+#define HAS_LINK(f)    (((struct tuple_flags *)(&(f)))->has_link)
+#define MFC_FN(f)      (((struct tuple_flags *)(&(f)))->mfc_fn)
+#define SPACE(f)       (((struct tuple_flags *)(&(f)))->space)
 
 int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function,
                        tuple_t *tuple)