Skip to content

Commit

Permalink
pcmcia: Remove typedef tuple_flags
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
himangi774 authored and Dominik Brodowski committed May 30, 2015
1 parent 0f06abd commit 820dc84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 820dc84

Please sign in to comment.