diff mbox series

[1/2] ALSA: cs46xx: mark snd_cs46xx_download_image as static

Message ID 20230516195046.550584-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit ccecefa4f89971e34745abbffdaf4d2c3fb2f457
Headers show
Series [1/2] ALSA: cs46xx: mark snd_cs46xx_download_image as static | expand

Commit Message

Arnd Bergmann May 16, 2023, 7:50 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

snd_cs46xx_download_image() was originally called from dsp_spos.c, but
is now local to cs46xx_lib.c. Mark it as 'static' to avoid a warning
about it lacking a declaration, and '__maybe_unused' to avoid a warning
about it being unused when CONFIG_SND_CS46XX_NEW_DSP is disabled:

sound/pci/cs46xx/cs46xx_lib.c:534:5: error: no previous prototype for 'snd_cs46xx_download_image'

Fixes: 89f157d9e6bf ("[ALSA] cs46xx - Fix PM resume")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/pci/cs46xx/cs46xx_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai May 17, 2023, 2:56 p.m. UTC | #1
On Tue, 16 May 2023 21:50:41 +0200,
Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> snd_cs46xx_download_image() was originally called from dsp_spos.c, but
> is now local to cs46xx_lib.c. Mark it as 'static' to avoid a warning
> about it lacking a declaration, and '__maybe_unused' to avoid a warning
> about it being unused when CONFIG_SND_CS46XX_NEW_DSP is disabled:
> 
> sound/pci/cs46xx/cs46xx_lib.c:534:5: error: no previous prototype for 'snd_cs46xx_download_image'
> 
> Fixes: 89f157d9e6bf ("[ALSA] cs46xx - Fix PM resume")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, applied now.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 62f45847b351..7d882b33d45e 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -531,7 +531,7 @@  static int load_firmware(struct snd_cs46xx *chip)
 	return err;
 }
 
-int snd_cs46xx_download_image(struct snd_cs46xx *chip)
+static __maybe_unused int snd_cs46xx_download_image(struct snd_cs46xx *chip)
 {
 	int idx, err;
 	unsigned int offset = 0;