Re: [PATCH] ALSA: interwave: fix build warnings with CONFIG_PM=n
From: Takashi Iwai
Date: Mon Apr 13 2026 - 03:37:26 EST
On Mon, 13 Apr 2026 09:12:11 +0200,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Parts of the newly added power management code are identified
> as unused by gcc:
>
> sound/isa/gus/interwave.c:489:13: error: 'snd_interwave_restore_memory' defined but not used [-Werror=unused-function]
> 489 | static void snd_interwave_restore_memory(struct snd_gus_card *gus)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sound/isa/gus/interwave.c:483:13: error: 'snd_interwave_restore_regs' defined but not used [-Werror=unused-function]
> 483 | static void snd_interwave_restore_regs(struct snd_gus_card *gus)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from sound/isa/gus/interwave-stb.c:3:
> sound/isa/gus/interwave.c:489:13: error: 'snd_interwave_restore_memory' defined but not used [-Werror=unused-function]
> 489 | static void snd_interwave_restore_memory(struct snd_gus_card *gus)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> sound/isa/gus/interwave.c:483:13: error: 'snd_interwave_restore_regs' defined but not used [-Werror=unused-function]
> 483 | static void snd_interwave_restore_regs(struct snd_gus_card *gus)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Add an #ifdef check around these to match the callers.
>
> Fixes: 6f800c3397b7 ("ALSA: interwave: add ISA and PnP suspend and resume callbacks")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Thanks, this should have been already fixed on sound git tree by the
commit b7feba842c0d5f6c5b01592f80d164e974767501
ALSA: interwave: guard PM-only restore helpers with CONFIG_PM
Takashi