Skip to contentSkip to conversation

ASoC: qdsp6: fix compile-testing without CONFIG_OF

PATCH In review Arnd Bergmann 2 participants 2 messages May 23, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qdsp6: fix compile-testing without CONFIG_OF

From: Arnd Bergmann <[email protected]>

The driver builds cleanly only when CONFIG_OF is enabled, otherwise the compiler notices an unused symbol:

sound/soc/qcom/qdsp6/q6usb.c:401:34: error: 'q6usb_dai_device_id' defined but not used [-Werror=unused-const-variable=]

The driver does not support legacy board files, so the of_match_ptr() annotation has no use here and can be removed to avoid the warning.

Fixes e0dd9240f13a ("ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device")
---
 sound/soc/qcom/qdsp6/q6usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6usb.c +1 -1
index adba0446f301..ebe0c2425927 100644
@@ -407,7 +407,7 @@ MODULE_DEVICE_TABLE(of, q6usb_dai_device_id);
 static struct platform_driver q6usb_dai_platform_driver = {
 	.driver = {
 		.name = "q6usb-dai",
-		.of_match_table = of_match_ptr(q6usb_dai_device_id),
+		.of_match_table = q6usb_dai_device_id,
 	},
 	.probe = q6usb_dai_dev_probe,
 	/*
Signature · 1 line
2.39.5
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The driver builds cleanly only when CONFIG_OF is enabled, otherwise the compiler notices an unused symbol:

sound/soc/qcom/qdsp6/q6usb.c:401:34: error: 'q6usb_dai_device_id' defined but not used [-Werror=unused-const-variable=]

Quoted 8 lines

The driver does not support legacy board files, so the of_match_ptr() annotation has no use here and can be removed to avoid the warning.

Fixes e0dd9240f13a ("ASoC: qcom: qdsp6: Fetch USB offload mapped card and PCM device")
---
 sound/soc/qcom/qdsp6/q6usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I'll take this in the USB tree as that's where the offending commit came from.

Thanks!

greg k-h