Skip to contentSkip to conversation

sound/oss/opl3: Remove typedef opl_devinfo

PATCH Applied Himangi Saraogi 2 participants 2 messages Aug 5, 2014 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/oss/opl3: Remove typedef opl_devinfo

This typedef is unnecessary and should just be removed as they are never used.

The following Coccinelle semantic patch detects the case.

@tn@
identifier i;
type td;
@@

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

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

-td
+ struct i

---
 sound/oss/opl3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/oss/opl3.c +2 -2
index 4709e59..607cee4 100644
@@ -52,7 +52,7 @@ struct voice_info
 	int             panning;	/* 0xffff means not set */
 };
 
-typedef struct opl_devinfo
+struct opl_devinfo
 {
 	int             base;
 	int             left_io, right_io;
@@ -73,7 +73,7 @@ typedef struct opl_devinfo
 	unsigned char   cmask;
 
 	int             is_opl4;
-} opl_devinfo;
+};
 
 static struct opl_devinfo *devc = NULL;
 
Signature · 1 line
1.9.1
Applied
#1 lore raw

At Tue, 5 Aug 2014 17:37:18 +0530,

Quoted 21 lines · Himangi Saraogi

This typedef is unnecessary and should just be removed as they are never used.

The following Coccinelle semantic patch detects the case.

@tn@
identifier i;
type td;
@@

(quoted diff) +0 -2
-typedef
 struct i { ... }
-td
 ;

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

Quoted 5 lines

-td
+ struct i

Applied, thanks.

Takashi

Quoted 29 lines
---
 sound/oss/opl3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/oss/opl3.c +2 -2
index 4709e59..607cee4 100644
@@ -52,7 +52,7 @@ struct voice_info
 	int             panning;	/* 0xffff means not set */
 };
 
-typedef struct opl_devinfo
+struct opl_devinfo
 {
 	int             base;
 	int             left_io, right_io;
@@ -73,7 +73,7 @@ typedef struct opl_devinfo
 	unsigned char   cmask;
 
 	int             is_opl4;
-} opl_devinfo;
+};
 
 static struct opl_devinfo *devc = NULL;
 
Signature · 1 line
1.9.1

1