Re: [PATCH] ASoC: fsl_easrc: mark PM functions __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 28, 2020 at 11:28:08PM +0200, Arnd Bergmann wrote:
> ifdefs are hard, and in this driver the suspend/resume functions are
> the only callers of some other helpers that trigger a harmless warning
> when CONFIG_PM is disabled:
> 
> sound/soc/fsl/fsl_easrc.c:1807:12: warning: 'fsl_easrc_get_firmware' defined but not used [-Wunused-function]
>  1807 | static int fsl_easrc_get_firmware(struct fsl_asrc *easrc)
>       |            ^~~~~~~~~~~~~~~~~~~~~~
> sound/soc/fsl/fsl_easrc.c:303:12: warning: 'fsl_easrc_resampler_config' defined but not used [-Wunused-function]
>   303 | static int fsl_easrc_resampler_config(struct fsl_asrc *easrc)
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Remove the #ifdef and just mark the callers as __maybe_unused to
> suppress the warnings altogether.
> 
> Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Acked-by: Nicolin Chen <nicoleotsuka@xxxxxxxxx>



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux