[PATCH 0/2] ASoC: qdsp6: cppcheck warnings
cppcheck throws below two warnings in qdsp6 code due to unnecessary initialization of variables
q6asm.c:1631: (style) Variable 'port' is reassigned a value before the old one has been used.
q6adm.c:475]: (style) Variable 'matrix_map' is reassigned a value before the old one has been used.
These series fixes it by removing those unnecessary initializations
Srinivas Kandagatla (2): ASoC: qdsp6: q6asm: fix cppcheck warnings for unnecessary initialization ASoC: qdsp6: q6adm: fix cppcheck warnings for unnecessary initialization
sound/soc/qcom/qdsp6/q6adm.c | 2 +- sound/soc/qcom/qdsp6/q6asm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
cppcheck reports below warning. q6asm.c:1631: (style) Variable 'port' is reassigned a value before the old one has been used.
This is due to unnecessary initialization of variable port, which is now removed as part of this patch.
Signed-off-by: Srinivas Kandagatla srinivas.kandagatla@linaro.org --- sound/soc/qcom/qdsp6/q6asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 36bf8bd4edd7..9251d8548965 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -1624,7 +1624,7 @@ EXPORT_SYMBOL_GPL(q6asm_write_async);
static void q6asm_reset_buf_state(struct audio_client *ac) { - struct audio_port_data *port = NULL; + struct audio_port_data *port; unsigned long flags;
spin_lock_irqsave(&ac->lock, flags);
cppcheck reports below warning.
q6adm.c:475]: (style) Variable 'matrix_map' is reassigned a value before the old one has been used.
This is due to unnecessary initialization of variable matrix_map, which is now removed as part of this patch.
Signed-off-by: Srinivas Kandagatla srinivas.kandagatla@linaro.org --- sound/soc/qcom/qdsp6/q6adm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 1855b805eba2..3d831b635524 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -465,7 +465,7 @@ int q6adm_matrix_map(struct device *dev, int path, struct apr_pkt *pkt; uint16_t *copps_list; int pkt_size, ret, i, copp_idx; - void *matrix_map = NULL; + void *matrix_map; struct q6copp *copp;
/* Assumes port_ids have already been validated during adm_open */
On Mon, 9 Aug 2021 13:31:35 +0100, Srinivas Kandagatla wrote:
cppcheck throws below two warnings in qdsp6 code due to unnecessary initialization of variables
q6asm.c:1631: (style) Variable 'port' is reassigned a value before the old one has been used.
q6adm.c:475]: (style) Variable 'matrix_map' is reassigned a value before the old one has been used.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: qdsp6: q6asm: fix cppcheck warnings for unnecessary initialization commit: e05f9ee5eabf4b88f9b9b264c8594ee6984b2131 [2/2] ASoC: qdsp6: q6adm: fix cppcheck warnings for unnecessary initialization commit: 455ecc808e99f154bd80541219f207f752a61c16
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