mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sound/oss/opl3: Remove typedef opl_devinfo
@ 2014-08-05 12:07 Himangi Saraogi
  2014-08-05 12:37 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Himangi Saraogi @ 2014-08-05 12:07 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel; +Cc: julia.lawall

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

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
---
 sound/oss/opl3.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c
index 4709e59..607cee4 100644
--- a/sound/oss/opl3.c
+++ b/sound/oss/opl3.c
@@ -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;
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sound/oss/opl3: Remove typedef opl_devinfo
  2014-08-05 12:07 [PATCH] sound/oss/opl3: Remove typedef opl_devinfo Himangi Saraogi
@ 2014-08-05 12:37 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2014-08-05 12:37 UTC (permalink / raw)
  To: Himangi Saraogi; +Cc: Jaroslav Kysela, alsa-devel, linux-kernel, julia.lawall

At Tue, 5 Aug 2014 17:37:18 +0530,
Himangi Saraogi wrote:
> 
> 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
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>

Applied, thanks.


Takashi


> ---
>  sound/oss/opl3.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c
> index 4709e59..607cee4 100644
> --- a/sound/oss/opl3.c
> +++ b/sound/oss/opl3.c
> @@ -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;
>  
> -- 
> 1.9.1
> 
1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-05 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 12:07 [PATCH] sound/oss/opl3: Remove typedef opl_devinfo Himangi Saraogi
2014-08-05 12:37 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®