public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: rk3308: add dependency on OF
@ 2024-03-29 20:44 Luca Ceresoli
  2024-04-02 13:04 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli @ 2024-03-29 20:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Heiko Stuebner
  Cc: Thomas Petazzoni, linux-sound, linux-kernel, kernel test robot,
	Luca Ceresoli

This driver is probed via device tree only, so depend on OF. Also remove
the unneeded of_match_ptr().

Fixes reported warnings:

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

Fixes: 9fdd7b45da18 ("arm64: defconfig: enable Rockchip RK3308 internal audio codec driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403271905.BYbGJiPi-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202403271907.0z0uuG5I-lkp@intel.com/
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
 sound/soc/codecs/Kconfig        | 1 +
 sound/soc/codecs/rk3308_codec.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 1c9d671a9848..7ee6c085bbc9 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1403,6 +1403,7 @@ config SND_SOC_PEB2466
 
 config SND_SOC_RK3308
 	tristate "Rockchip RK3308 audio CODEC"
+	depends on OF
 	select REGMAP_MMIO
 	help
 	  This is a device driver for the audio codec embedded in the
diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c
index 9d3e4691a7b5..6b1cb92997b4 100644
--- a/sound/soc/codecs/rk3308_codec.c
+++ b/sound/soc/codecs/rk3308_codec.c
@@ -962,7 +962,7 @@ MODULE_DEVICE_TABLE(of, rk3308_codec_of_match);
 static struct platform_driver rk3308_codec_driver = {
 	.driver = {
 		.name = "rk3308-acodec",
-		.of_match_table = of_match_ptr(rk3308_codec_of_match),
+		.of_match_table = rk3308_codec_of_match,
 	},
 	.probe = rk3308_codec_platform_probe,
 };

---
base-commit: 534a5adb26b1924542f55643718a4b5ae601a4e5
change-id: 20240329-rk3308-audio-codec-fix-warning-51bb572ebd96

Best regards,
-- 
Luca Ceresoli <luca.ceresoli@bootlin.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: rk3308: add dependency on OF
  2024-03-29 20:44 [PATCH] ASoC: codecs: rk3308: add dependency on OF Luca Ceresoli
@ 2024-04-02 13:04 ` Mark Brown
  2024-04-02 15:17   ` Luca Ceresoli
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2024-04-02 13:04 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Heiko Stuebner,
	Thomas Petazzoni, linux-sound, linux-kernel, kernel test robot

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

On Fri, Mar 29, 2024 at 09:44:47PM +0100, Luca Ceresoli wrote:

>  config SND_SOC_RK3308
>  	tristate "Rockchip RK3308 audio CODEC"
> +	depends on OF

There's no actual build dependency on OF, please add an || COMPILE_TEST
to improve build coverage and help maintainability.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: rk3308: add dependency on OF
  2024-04-02 13:04 ` Mark Brown
@ 2024-04-02 15:17   ` Luca Ceresoli
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Ceresoli @ 2024-04-02 15:17 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Heiko Stuebner,
	Thomas Petazzoni, linux-sound, linux-kernel, kernel test robot

Hello Mark,

On Tue, 2 Apr 2024 14:04:19 +0100
Mark Brown <broonie@kernel.org> wrote:

> On Fri, Mar 29, 2024 at 09:44:47PM +0100, Luca Ceresoli wrote:
> 
> >  config SND_SOC_RK3308
> >  	tristate "Rockchip RK3308 audio CODEC"
> > +	depends on OF  
> 
> There's no actual build dependency on OF, please add an || COMPILE_TEST
> to improve build coverage and help maintainability.

I see, thanks for the comment.

While there, an even better improvement is probably:

  depends on ARM64 || COMPILE_TEST

using ARM64 because this codec is known to exist only on the RK3308 and
ARM64 selects OF.

Best regards,
Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-02 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 20:44 [PATCH] ASoC: codecs: rk3308: add dependency on OF Luca Ceresoli
2024-04-02 13:04 ` Mark Brown
2024-04-02 15:17   ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox