From 65cec1ef250ae7d74047c8a0c3ea83644391a546 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 14:35:42 -0500 Subject: ALSA: isa/gus: remove -Wmissing-prototypes warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix W=1 warnings by adding prototypes to header file sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for ‘snd_gf1_timers_init’ [-Wmissing-prototypes] 141 | void snd_gf1_timers_init(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for ‘snd_gf1_timers_done’ [-Wmissing-prototypes] 177 | void snd_gf1_timers_done(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai --- sound/isa/gus/gus_reset.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound/isa') diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c index 07bfcda43827..9a1ab5872c4f 100644 --- a/sound/isa/gus/gus_reset.c +++ b/sound/isa/gus/gus_reset.c @@ -9,8 +9,6 @@ #include #include -extern void snd_gf1_timers_init(struct snd_gus_card * gus); -extern void snd_gf1_timers_done(struct snd_gus_card * gus); extern int snd_gf1_synth_init(struct snd_gus_card * gus); extern void snd_gf1_synth_done(struct snd_gus_card * gus); -- cgit From 6a4f2b6947d0f340a40359a906d07642825ac14e Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 14:35:43 -0500 Subject: ALSA: isa/gus: remove 'set but not used' warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix W=1 warning by noting variable as __always_unused. sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 16 | unsigned char stat, data, byte; Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai --- sound/isa/gus/gus_uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/isa') diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index 7586619770b3..4fb4ed79e262 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c @@ -13,7 +13,8 @@ static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus) { int count; - unsigned char stat, data, byte; + unsigned char stat, byte; + __always_unused unsigned char data; unsigned long flags; count = 10; -- cgit From c0dbbdad4e11f86d3e16fec50682c840e18a8135 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Wed, 8 Jul 2020 15:32:36 -0500 Subject: ALSA: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor Signed-off-by: Takashi Iwai --- sound/isa/galaxy/galaxy.c | 6 +++--- sound/isa/msnd/msnd_pinnacle_mixer.c | 4 +--- sound/isa/opti9xx/miro.c | 10 +++++----- sound/isa/opti9xx/opti92x-ad1848.c | 12 +++++++----- sound/isa/sb/sb8_main.c | 10 +++++----- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'sound/isa') diff --git a/sound/isa/galaxy/galaxy.c b/sound/isa/galaxy/galaxy.c index ce409e75ae51..65f9f46c9f58 100644 --- a/sound/isa/galaxy/galaxy.c +++ b/sound/isa/galaxy/galaxy.c @@ -247,7 +247,7 @@ static int snd_galaxy_match(struct device *dev, unsigned int n) break; case 2: irq[n] = 9; - /* Fall through */ + fallthrough; case 9: wss_config[n] |= WSS_CONFIG_IRQ_9; break; @@ -292,7 +292,7 @@ static int snd_galaxy_match(struct device *dev, unsigned int n) case 1: if (dma1[n] == 0) break; - /* Fall through */ + fallthrough; default: dev_err(dev, "invalid capture DMA %d\n", dma2[n]); return 0; @@ -322,7 +322,7 @@ mpu: break; case 2: mpu_irq[n] = 9; - /* Fall through */ + fallthrough; case 9: config[n] |= GALAXY_CONFIG_MPUIRQ_2; break; diff --git a/sound/isa/msnd/msnd_pinnacle_mixer.c b/sound/isa/msnd/msnd_pinnacle_mixer.c index 02c566fca9e5..63633bd41e5b 100644 --- a/sound/isa/msnd/msnd_pinnacle_mixer.c +++ b/sound/isa/msnd/msnd_pinnacle_mixer.c @@ -219,11 +219,9 @@ static int snd_msndmix_set(struct snd_msnd *dev, int d, int left, int right) case MSND_MIXER_VOLUME: /* master volume */ writew(wLeft, dev->SMA + SMA_wCurrMastVolLeft); writew(wRight, dev->SMA + SMA_wCurrMastVolRight); - /* fall through */ - + fallthrough; case MSND_MIXER_AUX: /* aux pot control */ /* scaled by master volume */ - /* fall through */ /* digital controls */ case MSND_MIXER_SYNTH: /* synth vol (dsp mix) */ diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index b039429e6871..44ed1b65f6ce 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c @@ -163,13 +163,13 @@ static int aci_busy_wait(struct snd_miro_aci *aci) switch (timeout-ACI_MINTIME) { case 0 ... 9: out /= 10; - /* fall through */ + fallthrough; case 10 ... 19: out /= 10; - /* fall through */ + fallthrough; case 20 ... 30: out /= 10; - /* fall through */ + fallthrough; default: set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(out); @@ -824,7 +824,7 @@ static unsigned char snd_miro_read(struct snd_miro *chip, retval = inb(chip->mc_base + 9); break; } - /* fall through */ + fallthrough; case OPTi9XX_HW_82C929: retval = inb(chip->mc_base + reg); @@ -854,7 +854,7 @@ static void snd_miro_write(struct snd_miro *chip, unsigned char reg, outb(value, chip->mc_base + 9); break; } - /* fall through */ + fallthrough; case OPTi9XX_HW_82C929: outb(value, chip->mc_base + reg); diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 0e6d20e49158..881d3b5711d2 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -249,7 +249,7 @@ static unsigned char snd_opti9xx_read(struct snd_opti9xx *chip, retval = inb(chip->mc_base + 9); break; } - /* Fall through */ + fallthrough; case OPTi9XX_HW_82C928: case OPTi9XX_HW_82C929: @@ -292,7 +292,7 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg, outb(value, chip->mc_base + 9); break; } - /* Fall through */ + fallthrough; case OPTi9XX_HW_82C928: case OPTi9XX_HW_82C929: @@ -343,7 +343,7 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip, snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(4), 0xf0, 0xfc); /* enable wave audio */ snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(6), 0x02, 0x02); - /* Fall through */ + fallthrough; case OPTi9XX_HW_82C925: /* enable WSS mode */ @@ -380,7 +380,8 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip, case OPTi9XX_HW_82C931: /* disable 3D sound (set GPIO1 as output, low) */ snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(20), 0x04, 0x0c); - /* fall through */ + fallthrough; + case OPTi9XX_HW_82C933: /* * The BTC 1817DW has QS1000 wavetable which is connected @@ -392,7 +393,8 @@ static int snd_opti9xx_configure(struct snd_opti9xx *chip, * or digital input signal. */ snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(26), 0x01, 0x01); - /* fall through */ + fallthrough; + case OPTi9XX_HW_82C930: snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(6), 0x02, 0x03); snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(3), 0x00, 0xff); diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c index e33dfe165276..86d0d2fdf48a 100644 --- a/sound/isa/sb/sb8_main.c +++ b/sound/isa/sb/sb8_main.c @@ -116,13 +116,13 @@ static int snd_sb8_playback_prepare(struct snd_pcm_substream *substream) chip->playback_format = SB_DSP_HI_OUTPUT_AUTO; break; } - /* fall through */ + fallthrough; case SB_HW_201: if (rate > 23000) { chip->playback_format = SB_DSP_HI_OUTPUT_AUTO; break; } - /* fall through */ + fallthrough; case SB_HW_20: chip->playback_format = SB_DSP_LO_OUTPUT_AUTO; break; @@ -261,7 +261,7 @@ static int snd_sb8_capture_prepare(struct snd_pcm_substream *substream) chip->capture_format = SB_DSP_HI_INPUT_AUTO; break; } - /* fall through */ + fallthrough; case SB_HW_20: chip->capture_format = SB_DSP_LO_INPUT_AUTO; break; @@ -361,7 +361,7 @@ irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip) case SB_MODE_PLAYBACK_16: /* ok.. playback is active */ if (chip->hardware != SB_HW_JAZZ16) break; - /* fall through */ + fallthrough; case SB_MODE_PLAYBACK_8: substream = chip->playback_substream; if (chip->playback_format == SB_DSP_OUTPUT) @@ -371,7 +371,7 @@ irqreturn_t snd_sb8dsp_interrupt(struct snd_sb *chip) case SB_MODE_CAPTURE_16: if (chip->hardware != SB_HW_JAZZ16) break; - /* fall through */ + fallthrough; case SB_MODE_CAPTURE_8: substream = chip->capture_substream; if (chip->capture_format == SB_DSP_INPUT) -- cgit From e2d413f9346149f056ffe083c999e2c136ca6788 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 9 Jul 2020 13:17:50 +0200 Subject: ALSA: Replace with fallthrough pseudo keyword in the remaining places A few places (except for ASoC) are left unconverted for the new fallthrough pseudo keyword. Now replace them all. Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200709111750.8337-4-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/isa/es18xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/isa') diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index d1135f6ae104..b417a750c60a 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -998,7 +998,7 @@ static int snd_es18xx_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem val = 3; } else retVal = snd_es18xx_mixer_bits(chip, 0x7a, 0x08, 0x00) != 0x00; - /* fall through */ + fallthrough; /* 4 source chips */ case 0x1868: case 0x1878: -- cgit From c7293858131c3f52d6a18321553c4650bf57462a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 5 Aug 2020 19:19:16 -0700 Subject: ALSA: isa: delete repeated words in comments Drop duplicated words in sound/isa/. {be, bit} Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200806021916.32369-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai --- sound/isa/cs423x/cs4236_lib.c | 2 +- sound/isa/es18xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/isa') diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c index 4a028f42bb74..52f05adb1870 100644 --- a/sound/isa/cs423x/cs4236_lib.c +++ b/sound/isa/cs423x/cs4236_lib.c @@ -39,7 +39,7 @@ * D7: consumer serial port enable (CS4237B,CS4238B) * D6: channels status block reset (CS4237B,CS4238B) * D5: user bit in sub-frame of digital audio data (CS4237B,CS4238B) - * D4: validity bit bit in sub-frame of digital audio data (CS4237B,CS4238B) + * D4: validity bit in sub-frame of digital audio data (CS4237B,CS4238B) * * C5 lower channel status (digital serial data description) (CS4237B,CS4238B) * D7-D6: first two bits of category code diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index b417a750c60a..5f8d7e8a5477 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -955,7 +955,7 @@ static int snd_es18xx_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_ele case 0x1887: case 0x1888: return snd_ctl_enum_info(uinfo, 1, 5, texts5Source); - case 0x1869: /* DS somewhat contradictory for 1869: could be be 5 or 8 */ + case 0x1869: /* DS somewhat contradictory for 1869: could be 5 or 8 */ case 0x1879: return snd_ctl_enum_info(uinfo, 1, 8, texts8Source); default: -- cgit