2024-04-03 11:09:31

by Luca Ceresoli

[permalink] [raw]
Subject: [PATCH v2 0/2] ASoC: codecs: rk3308: fix build warning without OF

This small series fixes a build warning reported by kernel test robot
<[email protected]> and improves the Kconfig entry.

Signed-off-by: Luca Ceresoli <[email protected]>
---
Changes in v2:
- Replaced v1 implementation with __maybe_unused
- Added patch to depend on || COMPILE_TEST
- Link to v1: https://lore.kernel.org/r/20240329-rk3308-audio-codec-fix-warning-v1-1-b9d177fcd6c9@bootlin.com

---
Luca Ceresoli (2):
ASoC: codecs: rk3308: fix "defined but not used" warning on !OF
ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST

sound/soc/codecs/Kconfig | 1 +
sound/soc/codecs/rk3308_codec.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 4ed0915f5bc4bcc81bca783a5b984f3d81e9764e
change-id: 20240329-rk3308-audio-codec-fix-warning-51bb572ebd96

Best regards,
--
Luca Ceresoli <[email protected]>



2024-04-03 11:40:27

by Luca Ceresoli

[permalink] [raw]
Subject: [PATCH v2 1/2] ASoC: codecs: rk3308: fix "defined but not used" warning on !OF

Building with CONFIG_OF=n triggers:

warning: 'rk3308_codec_of_match' defined but not used [-Wunused-const-variable=]
warning: unused variable 'rk3308_codec_of_match' [-Wunused-const-variable]

Even though OF is needed for probing, fix by declaring as __maybe_unused to
still allow building on non-OF configurations for build testing.

Fixes: 9fdd7b45da18 ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Luca Ceresoli <[email protected]>
---
sound/soc/codecs/rk3308_codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
index 9d3e4691a7b5..74c3836995b1 100644
--- a/sound/soc/codecs/rk3308_codec.c
+++ b/sound/soc/codecs/rk3308_codec.c
@@ -953,7 +953,7 @@ static int rk3308_codec_platform_probe(struct platform_device *pdev)
return 0;
}

-static const struct of_device_id rk3308_codec_of_match[] = {
+static const struct of_device_id __maybe_unused rk3308_codec_of_match[] = {
{ .compatible = "rockchip,rk3308-codec", },
{},
};

--
2.34.1


2024-04-03 21:46:49

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ASoC: codecs: rk3308: fix build warning without OF

On Wed, 03 Apr 2024 13:03:17 +0200, Luca Ceresoli wrote:
> This small series fixes a build warning reported by kernel test robot
> <[email protected]> and improves the Kconfig entry.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: codecs: rk3308: fix "defined but not used" warning on !OF
commit: 38d5387b7660476fd7e8e07d16ee436819e3544d
[2/2] ASoC: codecs: rk3308: depend on ARM64 || COMPILE_TEST
commit: 03246ade4646653bbc98fa6fa506891a51983259

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