public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] sound/oss/: cleanups
@ 2005-03-06 22:07 Adrian Bunk
  2005-03-28 20:55 ` Benoit Boissinot
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-03-06 22:07 UTC (permalink / raw)
  To: linux-kernel

This patch contains cleanups including the following:
- make needlessly global code static

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 sound/oss/ad1816.c      |    2 +-
 sound/oss/nm256.h       |    2 +-
 sound/oss/nm256_audio.c |    4 ++--
 sound/oss/nm256_coeff.h |    2 +-
 sound/oss/v_midi.c      |    2 --
 sound/oss/wavfront.c    |   12 ++++++------
 6 files changed, 11 insertions(+), 13 deletions(-)

--- linux-2.6.11-mm1-full/sound/oss/ad1816.c.old	2005-03-06 22:13:46.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/ad1816.c	2005-03-06 22:22:52.000000000 +0100
@@ -592,7 +592,7 @@
   {{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r}}
 
 
-mixer_ent mix_devices[SOUND_MIXER_NRDEVICES][2] = {
+static mixer_ent mix_devices[SOUND_MIXER_NRDEVICES][2] = {
 MIX_ENT(SOUND_MIXER_VOLUME,	14, 1, 8, 5,	14, 1, 0, 5),
 MIX_ENT(SOUND_MIXER_BASS,	 0, 0, 0, 0,	 0, 0, 0, 0),
 MIX_ENT(SOUND_MIXER_TREBLE,	 0, 0, 0, 0,	 0, 0, 0, 0),
--- linux-2.6.11-mm1-full/sound/oss/nm256.h.old	2005-03-06 22:14:23.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256.h	2005-03-06 22:24:47.000000000 +0100
@@ -284,7 +284,7 @@
 }
 
 /* Returns a non-zero value if we should use the coefficient cache. */
-extern int nm256_cachedCoefficients (struct nm256_info *card);
+static int nm256_cachedCoefficients (struct nm256_info *card);
 
 #endif
 \f
--- linux-2.6.11-mm1-full/sound/oss/nm256_coeff.h.old	2005-03-06 22:16:18.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256_coeff.h	2005-03-06 22:22:52.000000000 +0100
@@ -4650,7 +4650,7 @@
     card->coeffsCurrent = 1;
 }
 
-void
+static void
 nm256_loadCoefficient (struct nm256_info *card, int which, int number)
 {
     static u16 addrs[3] = { 0x1c, 0x21c, 0x408 };
--- linux-2.6.11-mm1-full/sound/oss/nm256_audio.c.old	2005-03-06 22:14:42.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256_audio.c	2005-03-06 22:22:52.000000000 +0100
@@ -31,7 +31,7 @@
 #include "nm256.h"
 #include "nm256_coeff.h"
 
-int nm256_debug;
+static int nm256_debug;
 static int force_load;
 
 /* 
@@ -138,7 +138,7 @@
 static int buffertop;
 
 /* Check to see if we're using the bank of cached coefficients. */
-int
+static int
 nm256_cachedCoefficients (struct nm256_info *card)
 {
     return usecache;
--- linux-2.6.11-mm1-full/sound/oss/v_midi.c.old	2005-03-06 22:17:55.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/v_midi.c	2005-03-06 22:22:52.000000000 +0100
@@ -39,8 +39,6 @@
  */
 
 
-void            (*midi_input_intr) (int dev, unsigned char data);
-
 static int v_midi_open (int dev, int mode,
 	      void            (*input) (int dev, unsigned char data),
 	      void            (*output) (int dev)
--- linux-2.6.11-mm1-full/sound/oss/wavfront.c.old	2005-03-06 22:18:52.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/wavfront.c	2005-03-06 22:22:52.000000000 +0100
@@ -151,11 +151,11 @@
 
 /*** Module-accessible parameters ***************************************/
 
-int wf_raw;     /* we normally check for "raw state" to firmware
-		   loading. if set, then during driver loading, the
-		   state of the board is ignored, and we reset the
-		   board and load the firmware anyway.
-		*/
+static int wf_raw;     /* we normally check for "raw state" to firmware
+			   loading. if set, then during driver loading, the
+			   state of the board is ignored, and we reset the
+			   board and load the firmware anyway.
+			*/
 		   
 static int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
 		          whatever state it is when the driver is loaded.
@@ -2911,7 +2911,7 @@
 	return 0;
 }	
 
-void
+static void
 wffx_mute (int onoff)
     
 {


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

* [2.6 patch] sound/oss/: cleanups
@ 2005-03-24  3:09 Adrian Bunk
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2005-03-24  3:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch contains cleanups including the following:
- make needlessly global code static

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 6 Mar 2005

 sound/oss/ad1816.c      |    2 +-
 sound/oss/nm256.h       |    2 +-
 sound/oss/nm256_audio.c |    4 ++--
 sound/oss/nm256_coeff.h |    2 +-
 sound/oss/v_midi.c      |    2 --
 sound/oss/wavfront.c    |   12 ++++++------
 6 files changed, 11 insertions(+), 13 deletions(-)

--- linux-2.6.11-mm1-full/sound/oss/ad1816.c.old	2005-03-06 22:13:46.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/ad1816.c	2005-03-06 22:22:52.000000000 +0100
@@ -592,7 +592,7 @@
   {{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r}}
 
 
-mixer_ent mix_devices[SOUND_MIXER_NRDEVICES][2] = {
+static mixer_ent mix_devices[SOUND_MIXER_NRDEVICES][2] = {
 MIX_ENT(SOUND_MIXER_VOLUME,	14, 1, 8, 5,	14, 1, 0, 5),
 MIX_ENT(SOUND_MIXER_BASS,	 0, 0, 0, 0,	 0, 0, 0, 0),
 MIX_ENT(SOUND_MIXER_TREBLE,	 0, 0, 0, 0,	 0, 0, 0, 0),
--- linux-2.6.11-mm1-full/sound/oss/nm256.h.old	2005-03-06 22:14:23.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256.h	2005-03-06 22:24:47.000000000 +0100
@@ -284,7 +284,7 @@
 }
 
 /* Returns a non-zero value if we should use the coefficient cache. */
-extern int nm256_cachedCoefficients (struct nm256_info *card);
+static int nm256_cachedCoefficients (struct nm256_info *card);
 
 #endif
 \f
--- linux-2.6.11-mm1-full/sound/oss/nm256_coeff.h.old	2005-03-06 22:16:18.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256_coeff.h	2005-03-06 22:22:52.000000000 +0100
@@ -4650,7 +4650,7 @@
     card->coeffsCurrent = 1;
 }
 
-void
+static void
 nm256_loadCoefficient (struct nm256_info *card, int which, int number)
 {
     static u16 addrs[3] = { 0x1c, 0x21c, 0x408 };
--- linux-2.6.11-mm1-full/sound/oss/nm256_audio.c.old	2005-03-06 22:14:42.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/nm256_audio.c	2005-03-06 22:22:52.000000000 +0100
@@ -31,7 +31,7 @@
 #include "nm256.h"
 #include "nm256_coeff.h"
 
-int nm256_debug;
+static int nm256_debug;
 static int force_load;
 
 /* 
@@ -138,7 +138,7 @@
 static int buffertop;
 
 /* Check to see if we're using the bank of cached coefficients. */
-int
+static int
 nm256_cachedCoefficients (struct nm256_info *card)
 {
     return usecache;
--- linux-2.6.11-mm1-full/sound/oss/v_midi.c.old	2005-03-06 22:17:55.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/v_midi.c	2005-03-06 22:22:52.000000000 +0100
@@ -39,8 +39,6 @@
  */
 
 
-void            (*midi_input_intr) (int dev, unsigned char data);
-
 static int v_midi_open (int dev, int mode,
 	      void            (*input) (int dev, unsigned char data),
 	      void            (*output) (int dev)
--- linux-2.6.11-mm1-full/sound/oss/wavfront.c.old	2005-03-06 22:18:52.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/oss/wavfront.c	2005-03-06 22:22:52.000000000 +0100
@@ -151,11 +151,11 @@
 
 /*** Module-accessible parameters ***************************************/
 
-int wf_raw;     /* we normally check for "raw state" to firmware
-		   loading. if set, then during driver loading, the
-		   state of the board is ignored, and we reset the
-		   board and load the firmware anyway.
-		*/
+static int wf_raw;     /* we normally check for "raw state" to firmware
+			   loading. if set, then during driver loading, the
+			   state of the board is ignored, and we reset the
+			   board and load the firmware anyway.
+			*/
 		   
 static int fx_raw = 1; /* if this is zero, we'll leave the FX processor in
 		          whatever state it is when the driver is loaded.
@@ -2911,7 +2911,7 @@
 	return 0;
 }	
 
-void
+static void
 wffx_mute (int onoff)
     
 {


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

* Re: [2.6 patch] sound/oss/: cleanups
  2005-03-06 22:07 Adrian Bunk
@ 2005-03-28 20:55 ` Benoit Boissinot
  2005-03-28 22:03   ` Adrian Bunk
  0 siblings, 1 reply; 5+ messages in thread
From: Benoit Boissinot @ 2005-03-28 20:55 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Sun, 6 Mar 2005 23:07:47 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> This patch contains cleanups including the following:
> - make needlessly global code static
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> --- linux-2.6.11-mm1-full/sound/oss/nm256_audio.c.old   2005-03-06 22:14:42.000000000 +0100
> +++ linux-2.6.11-mm1-full/sound/oss/nm256_audio.c       2005-03-06 22:22:52.000000000 +0100
> @@ -31,7 +31,7 @@
>  #include "nm256.h"
>  #include "nm256_coeff.h"
> 
> -int nm256_debug;
> +static int nm256_debug;
>  static int force_load;
> 
>  /*

nm256_debug is used in functions declared in nm256.h (those functions
are used in nm256_coeff.h and nm256_audio.c).
This part of the patch should be dropped (it doesn't build on gcc-4.0).

regards,

Benoit

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

* Re: [2.6 patch] sound/oss/: cleanups
  2005-03-28 20:55 ` Benoit Boissinot
@ 2005-03-28 22:03   ` Adrian Bunk
  2005-03-31 21:34     ` Benoit Boissinot
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-03-28 22:03 UTC (permalink / raw)
  To: Benoit Boissinot; +Cc: linux-kernel

On Mon, Mar 28, 2005 at 03:55:36PM -0500, Benoit Boissinot wrote:
> On Sun, 6 Mar 2005 23:07:47 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> > This patch contains cleanups including the following:
> > - make needlessly global code static
> > 
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
> > 
> > --- linux-2.6.11-mm1-full/sound/oss/nm256_audio.c.old   2005-03-06 22:14:42.000000000 +0100
> > +++ linux-2.6.11-mm1-full/sound/oss/nm256_audio.c       2005-03-06 22:22:52.000000000 +0100
> > @@ -31,7 +31,7 @@
> >  #include "nm256.h"
> >  #include "nm256_coeff.h"
> > 
> > -int nm256_debug;
> > +static int nm256_debug;
> >  static int force_load;
> > 
> >  /*
> 
> nm256_debug is used in functions declared in nm256.h (those functions
> are used in nm256_coeff.h and nm256_audio.c).

The usage in nm256_audio.c is clear (the variable is in this file).

In which other .c file did you find any usage of nm256_debug?

> This part of the patch should be dropped (it doesn't build on gcc-4.0).

That's a different problem.
Please apply the patch below on top of my other patch.

> regards,
> 
> Benoit



<--  snip  -->


Rearrange sound/oss/nm256_audio.c and to drop nm256_debug from nm256.h 
since it confuses gcc 4.0 .

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc1-mm3-full/sound/oss/nm256.h.old	2005-03-28 23:49:39.000000000 +0200
+++ linux-2.6.12-rc1-mm3-full/sound/oss/nm256.h	2005-03-28 23:51:33.000000000 +0200
@@ -128,9 +128,6 @@
     struct nm256_info *next_card;
 };
 
-/* Debug flag--bigger numbers mean more output. */
-extern int nm256_debug;
-
 /* The BIOS signature. */
 #define NM_SIGNATURE 0x4e4d0000
 /* Signature mask. */
--- linux-2.6.12-rc1-mm3-full/sound/oss/nm256_audio.c.old	2005-03-28 23:51:53.000000000 +0200
+++ linux-2.6.12-rc1-mm3-full/sound/oss/nm256_audio.c	2005-03-28 23:52:19.000000000 +0200
@@ -28,12 +28,13 @@
 #include <linux/delay.h>
 #include <linux/spinlock.h>
 #include "sound_config.h"
-#include "nm256.h"
-#include "nm256_coeff.h"
 
 static int nm256_debug;
 static int force_load;
 
+#include "nm256.h"
+#include "nm256_coeff.h"
+
 /* 
  * The size of the playback reserve.  When the playback buffer has less
  * than NM256_PLAY_WMARK_SIZE bytes to output, we request a new


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

* Re: [2.6 patch] sound/oss/: cleanups
  2005-03-28 22:03   ` Adrian Bunk
@ 2005-03-31 21:34     ` Benoit Boissinot
  0 siblings, 0 replies; 5+ messages in thread
From: Benoit Boissinot @ 2005-03-31 21:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Adrian Bunk

On Tue, 29 Mar 2005 00:03:07 +0200, Adrian Bunk <bunk@stusta.de> wrote:
> On Mon, Mar 28, 2005 at 03:55:36PM -0500, Benoit Boissinot wrote:
> > On Sun, 6 Mar 2005 23:07:47 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> > > This patch contains cleanups including the following:
> > > - make needlessly global code static
> > >
> That's a different problem.
> Please apply the patch below on top of my other patch.
>  
> <--  snip  -->
> 
> Rearrange sound/oss/nm256_audio.c and to drop nm256_debug from nm256.h
> since it confuses gcc 4.0 .

Could this patch go in -mm (it is needed for allyesconfig and gcc-4).

Thanks,

Benoit
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> --- linux-2.6.12-rc1-mm3-full/sound/oss/nm256.h.old     2005-03-28 23:49:39.000000000 +0200
> +++ linux-2.6.12-rc1-mm3-full/sound/oss/nm256.h 2005-03-28 23:51:33.000000000 +0200
> @@ -128,9 +128,6 @@
>      struct nm256_info *next_card;
>  };
> 
> -/* Debug flag--bigger numbers mean more output. */
> -extern int nm256_debug;
> -
>  /* The BIOS signature. */
>  #define NM_SIGNATURE 0x4e4d0000
>  /* Signature mask. */
> --- linux-2.6.12-rc1-mm3-full/sound/oss/nm256_audio.c.old       2005-03-28 23:51:53.000000000 +0200
> +++ linux-2.6.12-rc1-mm3-full/sound/oss/nm256_audio.c   2005-03-28 23:52:19.000000000 +0200
> @@ -28,12 +28,13 @@
>  #include <linux/delay.h>
>  #include <linux/spinlock.h>
>  #include "sound_config.h"
> -#include "nm256.h"
> -#include "nm256_coeff.h"
> 
>  static int nm256_debug;
>  static int force_load;
> 
> +#include "nm256.h"
> +#include "nm256_coeff.h"
> +
>  /*
>   * The size of the playback reserve.  When the playback buffer has less
>   * than NM256_PLAY_WMARK_SIZE bytes to output, we request a new
> 
>

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

end of thread, other threads:[~2005-03-31 21:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-24  3:09 [2.6 patch] sound/oss/: cleanups Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2005-03-06 22:07 Adrian Bunk
2005-03-28 20:55 ` Benoit Boissinot
2005-03-28 22:03   ` Adrian Bunk
2005-03-31 21:34     ` Benoit Boissinot

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