Skip to content

Commit

Permalink
ALSA: pci/via82xx: remove 'set but not used' warnings
Browse files Browse the repository at this point in the history
Fix W=1 warnings. Mark variables as __always_unused.

sound/pci/via82xx.c: In function ‘snd_via82xx_codec_wait’:
sound/pci/via82xx.c:547:6: warning: variable ‘err’ set but not used
[-Wunused-but-set-variable]
  547 |  int err;
      |      ^~~
sound/pci/via82xx_modem.c: In function ‘snd_via82xx_codec_wait’:
sound/pci/via82xx_modem.c:401:6: warning: variable ‘err’ set but not
used [-Wunused-but-set-variable]
  401 |  int err;
      |      ^~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Pierre-Louis Bossart authored and Takashi Iwai committed Jul 7, 2020
1 parent af8c5df commit 86a5d9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sound/pci/via82xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static int snd_via82xx_codec_valid(struct via82xx *chip, int secondary)
static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
{
struct via82xx *chip = ac97->private_data;
int err;
__always_unused int err;
err = snd_via82xx_codec_ready(chip, ac97->num);
/* here we need to wait fairly for long time.. */
if (!nodelay)
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/via82xx_modem.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static int snd_via82xx_codec_valid(struct via82xx_modem *chip, int secondary)
static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
{
struct via82xx_modem *chip = ac97->private_data;
int err;
__always_unused int err;
err = snd_via82xx_codec_ready(chip, ac97->num);
/* here we need to wait fairly for long time.. */
msleep(500);
Expand Down

0 comments on commit 86a5d9c

Please sign in to comment.