Re: [PATCH] ALSA: interwave: guard PM-only restore helpers with CONFIG_PM

From: Takashi Iwai

Date: Fri Apr 10 2026 - 10:43:09 EST


On Fri, 10 Apr 2026 15:56:52 +0200,
Cássio Gabriel wrote:
>
> The InterWave PM patch added snd_interwave_restore_regs() and
> snd_interwave_restore_memory() as static helpers, but both are used only
> from the resume path under CONFIG_PM.
>
> On configurations without CONFIG_PM, such as alpha allyesconfig, this
> leaves both helpers unused and triggers -Wunused-function warnings with
> W=1.
>
> Move the PM-only helpers into the existing CONFIG_PM section. Keep
> __snd_interwave_restore_regs() outside the guard because it is also used
> during probe-time initialization.
>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202604101958.x16oNkfo-lkp@xxxxxxxxx/
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>

Applied now. Thanks.


Takashi