[PATCH 0/2] ASoC: qdsp6: fix some warnings when build without CONFIG_OF
Here are fixes for two warnings types discovered while building qdsp6 drivers without CONFIG_OF and with W=1
One of them was reported by Intel kernel test robot on q6afe-clocks patch, which equally applies to rest of the qdsp6 drivers.
Srinivas Kandagatla (2): ASoC: qdsp6: Drop of_match_ptr to fix -Wunused-const-variable ASoC: q6asm: fix kernel doc warnings
sound/soc/qcom/qdsp6/q6adm.c | 2 +- sound/soc/qcom/qdsp6/q6afe-clocks.c | 2 +- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6afe.c | 2 +- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- sound/soc/qcom/qdsp6/q6asm.c | 5 ++++- sound/soc/qcom/qdsp6/q6core.c | 2 +- sound/soc/qcom/qdsp6/q6routing.c | 2 +- 8 files changed, 11 insertions(+), 8 deletions(-)
The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:
sound/soc/qcom/qdsp6/q6afe-clocks.c:254:34: warning: unused variable 'q6afe_clock_device_id' [-Wunused-const-variable]
Fix this warning for all qdsp6 drivers.
Reported-by: kernel test robot lkp@intel.com Signed-off-by: Srinivas Kandagatla srinivas.kandagatla@linaro.org --- sound/soc/qcom/qdsp6/q6adm.c | 2 +- sound/soc/qcom/qdsp6/q6afe-clocks.c | 2 +- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6afe.c | 2 +- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- sound/soc/qcom/qdsp6/q6asm.c | 2 +- sound/soc/qcom/qdsp6/q6core.c | 2 +- sound/soc/qcom/qdsp6/q6routing.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 2f3ea6beb066..23611db59d5e 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -623,7 +623,7 @@ static struct apr_driver qcom_q6adm_driver = { .callback = q6adm_callback, .driver = { .name = "qcom-q6adm", - .of_match_table = of_match_ptr(q6adm_device_id), + .of_match_table = q6adm_device_id }, };
diff --git a/sound/soc/qcom/qdsp6/q6afe-clocks.c b/sound/soc/qcom/qdsp6/q6afe-clocks.c index 2967f4546af5..e652a69869f9 100644 --- a/sound/soc/qcom/qdsp6/q6afe-clocks.c +++ b/sound/soc/qcom/qdsp6/q6afe-clocks.c @@ -260,7 +260,7 @@ MODULE_DEVICE_TABLE(of, q6afe_clock_device_id); static struct platform_driver q6afe_clock_platform_driver = { .driver = { .name = "q6afe-clock", - .of_match_table = of_match_ptr(q6afe_clock_device_id), + .of_match_table = q6afe_clock_device_id }, .probe = q6afe_clock_dev_probe, }; diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index d58b86a98114..ce39d97bbc13 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -1698,7 +1698,7 @@ MODULE_DEVICE_TABLE(of, q6afe_dai_device_id); static struct platform_driver q6afe_dai_platform_driver = { .driver = { .name = "q6afe-dai", - .of_match_table = of_match_ptr(q6afe_dai_device_id), + .of_match_table = q6afe_dai_device_id }, .probe = q6afe_dai_dev_probe, }; diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c index 688878a002a4..bce4b2134c0a 100644 --- a/sound/soc/qcom/qdsp6/q6afe.c +++ b/sound/soc/qcom/qdsp6/q6afe.c @@ -1762,7 +1762,7 @@ static struct apr_driver qcom_q6afe_driver = { .callback = q6afe_callback, .driver = { .name = "qcom-q6afe", - .of_match_table = of_match_ptr(q6afe_device_id), + .of_match_table = q6afe_device_id,
}, }; diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index a1dd31f306ce..28f056c404bb 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -1343,7 +1343,7 @@ MODULE_DEVICE_TABLE(of, q6asm_dai_device_id); static struct platform_driver q6asm_dai_platform_driver = { .driver = { .name = "q6asm-dai", - .of_match_table = of_match_ptr(q6asm_dai_device_id), + .of_match_table = q6asm_dai_device_id, }, .probe = q6asm_dai_probe, }; diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index d745a02fcd5f..34a6e894242e 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -1745,7 +1745,7 @@ static struct apr_driver qcom_q6asm_driver = { .callback = q6asm_srvc_callback, .driver = { .name = "qcom-q6asm", - .of_match_table = of_match_ptr(q6asm_device_id), + .of_match_table = q6asm_device_id, }, };
diff --git a/sound/soc/qcom/qdsp6/q6core.c b/sound/soc/qcom/qdsp6/q6core.c index ae314a652efe..99fe36447525 100644 --- a/sound/soc/qcom/qdsp6/q6core.c +++ b/sound/soc/qcom/qdsp6/q6core.c @@ -366,7 +366,7 @@ static struct apr_driver qcom_q6core_driver = { .callback = q6core_callback, .driver = { .name = "qcom-q6core", - .of_match_table = of_match_ptr(q6core_device_id), + .of_match_table = q6core_device_id }, };
diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index b12539fae6ed..cc731c19a8ab 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -1152,7 +1152,7 @@ MODULE_DEVICE_TABLE(of, q6pcm_routing_device_id); static struct platform_driver q6pcm_routing_platform_driver = { .driver = { .name = "q6routing", - .of_match_table = of_match_ptr(q6pcm_routing_device_id), + .of_match_table = q6pcm_routing_device_id, }, .probe = q6pcm_routing_probe, .remove = q6pcm_routing_remove,
On Fri, Sep 25, 2020 at 09:49:24AM +0100, Srinivas Kandagatla wrote:
The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:
It's better to fix this by adding #ifdefs around the table so that we don't have unneeded bloat from the match table in !OF cases.
On 25/09/2020 17:17, Mark Brown wrote:
On Fri, Sep 25, 2020 at 09:49:24AM +0100, Srinivas Kandagatla wrote:
The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:
It's better to fix this by adding #ifdefs around the table so that we don't have unneeded bloat from the match table in !OF cases.
sure, I will respin series with that change!
--srini
This patch fixes below kernel doc warnings on not describing all the parmeters
sound/soc/qcom/qdsp6/q6asm.c:927: warning: Function parameter or member 'stream_id' not described in 'q6asm_open_write' sound/soc/qcom/qdsp6/q6asm.c:927: warning: Function parameter or member 'is_gapless' not described in 'q6asm_open_write' sound/soc/qcom/qdsp6/q6asm.c:1053: warning: Function parameter or member 'stream_id' not described in 'q6asm_run'
Signed-off-by: Srinivas Kandagatla srinivas.kandagatla@linaro.org --- sound/soc/qcom/qdsp6/q6asm.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 34a6e894242e..91999c9f016c 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -915,9 +915,11 @@ static int q6asm_ac_send_cmd_sync(struct audio_client *ac, struct apr_pkt *pkt) /** * q6asm_open_write() - Open audio client for writing * @ac: audio client pointer + * @stream_id: stream id of q6asm session * @format: audio sample format * @codec_profile: compressed format profile * @bits_per_sample: bits per sample + * @is_gapless: flag to indicate if this is a gapless stream * * Return: Will be an negative value on error or zero on success */ @@ -1042,6 +1044,7 @@ static int __q6asm_run(struct audio_client *ac, uint32_t stream_id, * q6asm_run() - start the audio client * * @ac: audio client pointer + * @stream_id: stream id of q6asm session * @flags: flags associated with write * @msw_ts: timestamp msw * @lsw_ts: timestamp lsw
On Fri, 25 Sep 2020 09:49:23 +0100, Srinivas Kandagatla wrote:
Here are fixes for two warnings types discovered while building qdsp6 drivers without CONFIG_OF and with W=1
One of them was reported by Intel kernel test robot on q6afe-clocks patch, which equally applies to rest of the qdsp6 drivers.
Srinivas Kandagatla (2): ASoC: qdsp6: Drop of_match_ptr to fix -Wunused-const-variable ASoC: q6asm: fix kernel doc warnings
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: q6asm: fix kernel doc warnings commit: 5d0576bba9eb37bf07dc58a91568a2332a22fbcd
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)
-
Mark Brown
-
Srinivas Kandagatla