* [2.6 patch] sound/oss/sscape.c: remove dead code
@ 2005-04-15 0:48 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-04-15 0:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
The Coverity checker found that sscape_sb_enable never get's assigned
any value different from 0, and therefore some code paths are
impossible.
This patch removes this variable and the dead code paths.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 24 Mar 2005
sound/oss/sscape.c | 8 +-------
1 files changed, 1 insertion(+), 7 deletions(-)
--- linux-2.6.12-rc1-mm1-full/sound/oss/sscape.c.old 2005-03-23 01:10:35.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/oss/sscape.c 2005-03-23 01:11:38.000000000 +0100
@@ -991,7 +991,6 @@ static void __init sscape_pnp_init_hw(ss
unsigned i;
static char code_file_name[23] = "/sndscape/sndscape.cox";
- int sscape_sb_enable = 0;
int sscape_joystic_enable = 0x7f;
int sscape_mic_enable = 0;
int sscape_ext_midi = 0;
@@ -1015,14 +1014,9 @@ static void __init sscape_pnp_init_hw(ss
sscape_write( devc, 2, devc->ic_type == IC_ODIE ? 0x70 : 0x40);
sscape_write( devc, 3, ( devc -> dma << 4) | 0x80);
- if ( sscape_sb_enable )
- sscape_write (devc, 4, 0xF0 | (sb_irq << 2) | midi_irq);
- else
- sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
+ sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
i = 0x10; //sscape_read(devc, 9) & (devc->ic_type == IC_ODIE ? 0xf0 : 0xc0);
- if ( sscape_sb_enable )
- i |= devc->ic_type == IC_ODIE ? 0x05 : 0x07;
if (sscape_joystic_enable) i |= 8;
sscape_write (devc, 9, i);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [2.6 patch] sound/oss/sscape.c: remove dead code
@ 2005-03-23 23:44 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-23 23:44 UTC (permalink / raw)
To: linux-kernel
The Coverity checker found that sscape_sb_enable never get's assigned
any value different from 0, and therefore some code paths are
impossible.
This patch removes this variable and the dead code paths.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
sound/oss/sscape.c | 8 +-------
1 files changed, 1 insertion(+), 7 deletions(-)
--- linux-2.6.12-rc1-mm1-full/sound/oss/sscape.c.old 2005-03-23 01:10:35.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/sound/oss/sscape.c 2005-03-23 01:11:38.000000000 +0100
@@ -991,7 +991,6 @@ static void __init sscape_pnp_init_hw(ss
unsigned i;
static char code_file_name[23] = "/sndscape/sndscape.cox";
- int sscape_sb_enable = 0;
int sscape_joystic_enable = 0x7f;
int sscape_mic_enable = 0;
int sscape_ext_midi = 0;
@@ -1015,14 +1014,9 @@ static void __init sscape_pnp_init_hw(ss
sscape_write( devc, 2, devc->ic_type == IC_ODIE ? 0x70 : 0x40);
sscape_write( devc, 3, ( devc -> dma << 4) | 0x80);
- if ( sscape_sb_enable )
- sscape_write (devc, 4, 0xF0 | (sb_irq << 2) | midi_irq);
- else
- sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
+ sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
i = 0x10; //sscape_read(devc, 9) & (devc->ic_type == IC_ODIE ? 0xf0 : 0xc0);
- if ( sscape_sb_enable )
- i |= devc->ic_type == IC_ODIE ? 0x05 : 0x07;
if (sscape_joystic_enable) i |= 8;
sscape_write (devc, 9, i);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-15 0:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-15 0:48 [2.6 patch] sound/oss/sscape.c: remove dead code Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-03-23 23:44 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox