ASoC: airoha: Fix sparse warning for AN7581 AFE PCM
Subsystems (3)
PATCH 1/1 ASoC: airoha: Fix sparse warning for AN7581 AFE PCM
Fix sparse warning reported by kernel bot:
sparse warnings: (new ones prefixed by >>)
Quoted 2 lines
Quoted 2 lines
sound/soc/mediatek/an7581/an7581-afe-pcm.c:144:30: sparse: sparse: symbol 'an7581_afe_fe_ops' was not declared. Should it be static?sound/soc/mediatek/an7581/an7581-afe-pcm.c:419:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *base @@ got void [noderef]__iomem* @@
sound/soc/mediatek/an7581/an7581-afe-pcm.c:419:14: sparse: expected void *base
sound/soc/mediatek/an7581/an7581-afe-pcm.c:419:14: sparse: got void [noderef] __iomem *
Quoted 1 line
Quoted 1 line
sound/soc/mediatek/an7581/an7581-afe-pcm.c:439:42: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef]__iomem*regs @@ got void *base @@
sound/soc/mediatek/an7581/an7581-afe-pcm.c:439:42: sparse: expected void [noderef] __iomem *regs
Make an7581_afe_fe_ops static and add __iomem for the base from devm_platform_ioremap_resource.
--- sound/soc/mediatek/an7581/an7581-afe-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/mediatek/an7581/an7581-afe-pcm.c +2 -2
@@ -141,7 +141,7 @@ static int an7581_afe_fe_startup(struct snd_pcm_substream *substream, struct sndreturn ret; } -const struct snd_soc_dai_ops an7581_afe_fe_ops = { +static const struct snd_soc_dai_ops an7581_afe_fe_ops = { .startup = an7581_afe_fe_startup, .shutdown = mtk_afe_fe_shutdown, .hw_params = mtk_afe_fe_hw_params,
@@ -375,7 +375,7 @@ static int an7581_afe_pcm_dev_probe(struct platform_device *pdev)struct reset_control *reset;struct mtk_base_afe *afe;int i, irq_id, ret; -void *base; +void __iomem *base; afe =devm_kzalloc (dev,sizeof (*afe),GFP_KERNEL );if (!afe)
Signature · 1 line
2.55.0
Mark Brown
maintainerQuoted 1 line · Christian Marangi
ASoC: airoha: Fix sparse warning for AN7581 AFE PCM
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: airoha: Fix sparse warning for AN7581 AFE PCM
https://git.kernel.org/broonie/sound/c/cc466c77059e
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark