[PATCH v2 1/2] ASoC: qcom: explicitly include binding headers when used
Few units use qcom,lpass.h binding headers but they rely on them being included through a different header. Make the usage explicit which allows easier to find the users of a header.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
---
Changes in v2: 1. New patch --- sound/soc/qcom/lpass-cdc-dma.c | 1 + sound/soc/qcom/lpass-cpu.c | 1 + sound/soc/qcom/lpass-platform.c | 1 + sound/soc/qcom/sc7280.c | 1 + 4 files changed, 4 insertions(+)
diff --git a/sound/soc/qcom/lpass-cdc-dma.c b/sound/soc/qcom/lpass-cdc-dma.c index 8221e2cbe35c..586f23049447 100644 --- a/sound/soc/qcom/lpass-cdc-dma.c +++ b/sound/soc/qcom/lpass-cdc-dma.c @@ -5,6 +5,7 @@ * lpass-cdc-dma.c -- ALSA SoC CDC DMA CPU DAI driver for QTi LPASS */
+#include <dt-bindings/sound/qcom,lpass.h> #include <linux/clk.h> #include <linux/module.h> #include <linux/export.h> diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 39571fed4001..d15039bb7f82 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -5,6 +5,7 @@ * lpass-cpu.c -- ALSA SoC CPU DAI driver for QTi LPASS */
+#include <dt-bindings/sound/qcom,lpass.h> #include <linux/clk.h> #include <linux/kernel.h> #include <linux/module.h> diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c index 73e3d39bd24c..5b99b41956ed 100644 --- a/sound/soc/qcom/lpass-platform.c +++ b/sound/soc/qcom/lpass-platform.c @@ -5,6 +5,7 @@ * lpass-platform.c -- ALSA SoC platform driver for QTi LPASS */
+#include <dt-bindings/sound/qcom,lpass.h> #include <linux/dma-mapping.h> #include <linux/export.h> #include <linux/kernel.h> diff --git a/sound/soc/qcom/sc7280.c b/sound/soc/qcom/sc7280.c index c23df4c8f341..095756883050 100644 --- a/sound/soc/qcom/sc7280.c +++ b/sound/soc/qcom/sc7280.c @@ -4,6 +4,7 @@ // // ALSA SoC Machine driver for sc7280
+#include <dt-bindings/sound/qcom,lpass.h> #include <linux/input.h> #include <linux/module.h> #include <linux/of_device.h>
Move the includes of binding headers from Qualcomm SoC sound drivers headers to unit files actually using these bindings. This reduces the amount of work for C preprocessor and makes usage of bindings easier to follow. No impact expected on the final binaries.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
---
Changes in v2: 1. Do not remove include of dt-bindings/sound/qcom,lpass.h from the sound/soc/qcom/lpass.h, because it is actually used there. This fixes kernel test robot report. --- sound/soc/qcom/apq8016_sbc.c | 1 + sound/soc/qcom/common.c | 2 +- sound/soc/qcom/qdsp6/q6afe-clocks.c | 1 + sound/soc/qcom/qdsp6/q6afe-dai.c | 1 + sound/soc/qcom/qdsp6/q6afe.c | 1 + sound/soc/qcom/qdsp6/q6afe.h | 2 -- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 1 + sound/soc/qcom/qdsp6/q6apm.h | 1 - sound/soc/qcom/qdsp6/q6asm-dai.c | 1 + sound/soc/qcom/qdsp6/q6asm.c | 1 + sound/soc/qcom/qdsp6/q6asm.h | 1 - sound/soc/qcom/qdsp6/q6prm-clocks.c | 2 +- sound/soc/qcom/qdsp6/q6routing.c | 2 ++ sound/soc/qcom/sc7180.c | 1 - sound/soc/qcom/sc7280.c | 1 + sound/soc/qcom/sc8280xp.c | 1 + sound/soc/qcom/sdm845.c | 1 + sound/soc/qcom/sdw.c | 2 +- sound/soc/qcom/sm8250.c | 1 + 19 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index ff9f6a1c95df..efbdbb4dd753 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -16,6 +16,7 @@ #include <sound/soc.h> #include <uapi/linux/input-event-codes.h> #include <dt-bindings/sound/apq8016-lpass.h> +#include <dt-bindings/sound/qcom,q6afe.h> #include "common.h" #include "qdsp6/q6afe.h"
diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index f2d1e3009cd2..483bbf53a541 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -2,10 +2,10 @@ // Copyright (c) 2018, Linaro Limited. // Copyright (c) 2018, The Linux Foundation. All rights reserved.
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/module.h> #include <sound/jack.h> #include <linux/input-event-codes.h> -#include "qdsp6/q6afe.h" #include "common.h"
static const struct snd_soc_dapm_widget qcom_jack_snd_widgets[] = { diff --git a/sound/soc/qcom/qdsp6/q6afe-clocks.c b/sound/soc/qcom/qdsp6/q6afe-clocks.c index 1ccab64ff00b..84b9018c36ba 100644 --- a/sound/soc/qcom/qdsp6/q6afe-clocks.c +++ b/sound/soc/qcom/qdsp6/q6afe-clocks.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020, Linaro Limited
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/err.h> #include <linux/init.h> #include <linux/clk-provider.h> diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index 3faa7e0eb0dd..a9c4f896a7df 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -2,6 +2,7 @@ // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. // Copyright (c) 2018, Linaro Limited
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/err.h> #include <linux/init.h> #include <linux/module.h> diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c index 919e326b9462..91d39f6ad0bd 100644 --- a/sound/soc/qcom/qdsp6/q6afe.c +++ b/sound/soc/qcom/qdsp6/q6afe.c @@ -2,6 +2,7 @@ // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. // Copyright (c) 2018, Linaro Limited
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/slab.h> #include <linux/kernel.h> #include <linux/uaccess.h> diff --git a/sound/soc/qcom/qdsp6/q6afe.h b/sound/soc/qcom/qdsp6/q6afe.h index 30fd77e2f458..65d0676075e1 100644 --- a/sound/soc/qcom/qdsp6/q6afe.h +++ b/sound/soc/qcom/qdsp6/q6afe.h @@ -3,8 +3,6 @@ #ifndef __Q6AFE_H__ #define __Q6AFE_H__
-#include <dt-bindings/sound/qcom,q6afe.h> - #define AFE_PORT_MAX 129
#define MSM_AFE_PORT_TYPE_RX 0 diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index 7ad604b80e25..a3864eea02d5 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2021, Linaro Limited
+#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> #include <linux/err.h> #include <linux/init.h> #include <linux/module.h> diff --git a/sound/soc/qcom/qdsp6/q6apm.h b/sound/soc/qcom/qdsp6/q6apm.h index f486bd639b9f..c248c8d2b1ab 100644 --- a/sound/soc/qcom/qdsp6/q6apm.h +++ b/sound/soc/qcom/qdsp6/q6apm.h @@ -13,7 +13,6 @@ #include <linux/of_platform.h> #include <linux/jiffies.h> #include <linux/soc/qcom/apr.h> -#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> #include "audioreach.h"
#define APM_PORT_MAX 127 diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 5e14cd0a38de..a7e37c6e4e92 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -2,6 +2,7 @@ // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. // Copyright (c) 2018, Linaro Limited
+#include <dt-bindings/sound/qcom,q6asm.h> #include <linux/init.h> #include <linux/err.h> #include <linux/module.h> diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 195780f75d05..06a802f9dba5 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -2,6 +2,7 @@ // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. // Copyright (c) 2018, Linaro Limited
+#include <dt-bindings/sound/qcom,q6asm.h> #include <linux/mutex.h> #include <linux/wait.h> #include <linux/module.h> diff --git a/sound/soc/qcom/qdsp6/q6asm.h b/sound/soc/qcom/qdsp6/q6asm.h index 394604c34943..0103d8dae5da 100644 --- a/sound/soc/qcom/qdsp6/q6asm.h +++ b/sound/soc/qcom/qdsp6/q6asm.h @@ -2,7 +2,6 @@ #ifndef __Q6_ASM_H__ #define __Q6_ASM_H__ #include "q6dsp-common.h" -#include <dt-bindings/sound/qcom,q6asm.h>
/* ASM client callback events */ #define CMD_PAUSE 0x0001 diff --git a/sound/soc/qcom/qdsp6/q6prm-clocks.c b/sound/soc/qcom/qdsp6/q6prm-clocks.c index 73b0cbac73d4..4c574b48ab00 100644 --- a/sound/soc/qcom/qdsp6/q6prm-clocks.c +++ b/sound/soc/qcom/qdsp6/q6prm-clocks.c @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2021, Linaro Limited
+#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> #include <linux/err.h> #include <linux/init.h> #include <linux/clk-provider.h> #include <linux/module.h> #include <linux/device.h> #include <linux/platform_device.h> -#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> #include "q6dsp-lpass-clocks.h" #include "q6prm.h"
diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index c583faae3a3e..c0856c10d0a8 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -2,6 +2,8 @@ // Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. // Copyright (c) 2018, Linaro Limited
+#include <dt-bindings/sound/qcom,q6asm.h> +#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/init.h> #include <linux/err.h> #include <linux/module.h> diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index d1fd40e3f7a9..21becfd5aff4 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -19,7 +19,6 @@ #include "../codecs/rt5682.h" #include "../codecs/rt5682s.h" #include "common.h" -#include "lpass.h"
#define DEFAULT_MCLK_RATE 19200000 #define RT5682_PLL1_FREQ (48000 * 512) diff --git a/sound/soc/qcom/sc7280.c b/sound/soc/qcom/sc7280.c index 095756883050..f61989d6b57d 100644 --- a/sound/soc/qcom/sc7280.c +++ b/sound/soc/qcom/sc7280.c @@ -5,6 +5,7 @@ // ALSA SoC Machine driver for sc7280
#include <dt-bindings/sound/qcom,lpass.h> +#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/input.h> #include <linux/module.h> #include <linux/of_device.h> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c index cfb9c8dbd599..6d4a43f94d51 100644 --- a/sound/soc/qcom/sc8280xp.c +++ b/sound/soc/qcom/sc8280xp.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2022, Linaro Limited
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/of_device.h> diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 25b964dea6c5..fed5673b61ba 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -3,6 +3,7 @@ * Copyright (c) 2018, The Linux Foundation. All rights reserved. */
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/of_device.h> diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c index ce89c0a33ef0..dd275123d31d 100644 --- a/sound/soc/qcom/sdw.c +++ b/sound/soc/qcom/sdw.c @@ -2,9 +2,9 @@ // Copyright (c) 2018, Linaro Limited. // Copyright (c) 2018, The Linux Foundation. All rights reserved.
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/module.h> #include <sound/soc.h> -#include "qdsp6/q6afe.h" #include "sdw.h"
int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream, diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index 6558bf2e14e8..b7e1a5496cfd 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020, Linaro Limited
+#include <dt-bindings/sound/qcom,q6afe.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/of_device.h>
On Thu, 05 Oct 2023 09:52:49 +0200, Krzysztof Kozlowski wrote:
Few units use qcom,lpass.h binding headers but they rely on them being included through a different header. Make the usage explicit which allows easier to find the users of a header.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: qcom: explicitly include binding headers when used commit: 0f729a285b4ef7d0cd2497c22233c42037486a7e [2/2] ASoC: qcom: reduce number of binding headers includes commit: 528a4a0bb010489abc3bb298c85c8ffb7ebe7735
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
participants (2)
-
Krzysztof Kozlowski
-
Mark Brown