ARM: footbridge: resolve set-but-not-used variable warnings
Subsystems (3)
PATCH 1/1 ARM: footbridge: resolve set-but-not-used variable warnings
In several functions in arch/arm/mach-footbridge/netwinder-hw.c, the value of the variable i is only used if DEBUG is defined (because dprintk() expands to nothing if it is not defined). This causes compilation warnings when building with W=1 if DEBUG is not defined. Resolve this issue by only defining the variable if DEBUG is defined.
Signed-off-by Ethan Nelson-Moore <[email protected]>
--- arch/arm/mach-footbridge/netwinder-hw.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/mach-footbridge/netwinder-hw.c +14 -0
@@ -469,13 +469,17 @@ static inline void rwa010_global_init(void)static inline void rwa010_game_port_init (void ) { +#ifdef DEBUG int i; +#endif WRITE_RWA (7 ,5 );dprintk ("Slider base: " );WRITE_RWA (0x61 ,1 ); +#ifdef DEBUG i =inb (0x203 ); +#endif WRITE_RWA (0x60 ,2 );dprintk ("%02X%02X (201)\n" ,inb (0x203 ), i);
@@ -485,13 +489,17 @@ static inline void rwa010_game_port_init(void)static inline void rwa010_waveartist_init (int base,int irq,int dma) { +#ifdef DEBUG int i; +#endif WRITE_RWA (7 ,0 );dprintk ("WaveArtist base: " );WRITE_RWA (0x61 , base &255 ); +#ifdef DEBUG i =inb (0x203 ); +#endif WRITE_RWA (0x60 , base >>8 );dprintk ("%02X%02X (%X)," ,inb (0x203 ), i, base);
@@ -507,13 +515,17 @@ static inline void rwa010_waveartist_init(int base, int irq, int dma)static inline void rwa010_soundblaster_init (int sb_base,int al_base,int irq,int dma) { +#ifdef DEBUG int i; +#endif WRITE_RWA (7 ,1 );dprintk ("SoundBlaster base: " );WRITE_RWA (0x61 , sb_base &255 ); +#ifdef DEBUG i =inb (0x203 ); +#endif WRITE_RWA (0x60 , sb_base >>8 );dprintk ("%02X%02X (%X)," ,inb (0x203 ), i, sb_base);
@@ -528,7 +540,9 @@ static inline void rwa010_soundblaster_init(int sb_base, int al_base, int irq, idprintk ("AdLib base: " );WRITE_RWA (0x63 , al_base &255 ); +#ifdef DEBUG i =inb (0x203 ); +#endif WRITE_RWA (0x62 , al_base >>8 );dprintk ("%02X%02X (%X)\n" ,inb (0x203 ), i, al_base);
Signature · 1 line
2.43.0