Skip to content

Commit 820dc84

Browse files
himangi774Dominik Brodowski
authored andcommitted
pcmcia: Remove typedef tuple_flags
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 <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dominik Brodowski <[email protected]>
1 parent 0f06abd commit 820dc84

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/pcmcia/cistpl.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,17 +434,17 @@ int pcmcia_replace_cis(struct pcmcia_socket *s,
434434

435435
/* The high-level CIS tuple services */
436436

437-
typedef struct tuple_flags {
437+
struct tuple_flags {
438438
u_int link_space:4;
439439
u_int has_link:1;
440440
u_int mfc_fn:3;
441441
u_int space:4;
442-
} tuple_flags;
442+
};
443443

444-
#define LINK_SPACE(f) (((tuple_flags *)(&(f)))->link_space)
445-
#define HAS_LINK(f) (((tuple_flags *)(&(f)))->has_link)
446-
#define MFC_FN(f) (((tuple_flags *)(&(f)))->mfc_fn)
447-
#define SPACE(f) (((tuple_flags *)(&(f)))->space)
444+
#define LINK_SPACE(f) (((struct tuple_flags *)(&(f)))->link_space)
445+
#define HAS_LINK(f) (((struct tuple_flags *)(&(f)))->has_link)
446+
#define MFC_FN(f) (((struct tuple_flags *)(&(f)))->mfc_fn)
447+
#define SPACE(f) (((struct tuple_flags *)(&(f)))->space)
448448

449449
int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function,
450450
tuple_t *tuple)

0 commit comments

Comments
 (0)