Skip to content

Commit

Permalink
Drivers: ide: Remove typedef atiixp_ide_timing
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
atiixp_ide_timing.

The following Coccinelle semantic patch detects the case:

@tn1@
type td;
@@

typedef struct { ... } td;

@script:python tf@
td << tn1.td;
tdres;
@@

coccinelle.tdres = td;

@@
type tn1.td;
identifier tf.tdres;
@@

-typedef
 struct
+  tdres
   { ... }
-td
 ;

@@
type tn1.td;
identifier tf.tdres;
@@

-td
+ struct tdres

Signed-off-by: Himangi Saraogi <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
himangi774 authored and davem330 committed Oct 15, 2014
1 parent 0429fbc commit 7546e52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/ide/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
#define ATIIXP_IDE_UDMA_CONTROL 0x54
#define ATIIXP_IDE_UDMA_MODE 0x56

typedef struct {
struct atiixp_ide_timing {
u8 command_width;
u8 recover_width;
} atiixp_ide_timing;
};

static atiixp_ide_timing pio_timing[] = {
static struct atiixp_ide_timing pio_timing[] = {
{ 0x05, 0x0d },
{ 0x04, 0x07 },
{ 0x03, 0x04 },
{ 0x02, 0x02 },
{ 0x02, 0x00 },
};

static atiixp_ide_timing mdma_timing[] = {
static struct atiixp_ide_timing mdma_timing[] = {
{ 0x07, 0x07 },
{ 0x02, 0x01 },
{ 0x02, 0x00 },
Expand Down

0 comments on commit 7546e52

Please sign in to comment.