* [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array
@ 2022-06-14 18:38 Colin Ian King
2022-06-14 18:48 ` Ranjani Sridharan
2022-06-16 11:15 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-06-14 18:38 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
There are two occurrences where the pointer array is being assigned a value
that is never read, the pointer gets updated in the next iteration of a
loop. These assignments are redundant and can be removed.
Cleans up clang scan-build warnings:
sound/soc/intel/skylake/skl-topology.c:2953:3: warning: Value stored to
'array' is never read [deadcode.DeadStores]
sound/soc/intel/skylake/skl-topology.c:3602:3: warning: Value stored to
'array' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
sound/soc/intel/skylake/skl-topology.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 9bdf020a2b64..e06eac592da1 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -2950,9 +2950,6 @@ static int skl_tplg_get_pvt_data(struct snd_soc_tplg_dapm_widget *tplg_w,
block_size = ret;
off += array->size;
- array = (struct snd_soc_tplg_vendor_array *)
- (tplg_w->priv.data + off);
-
data = (tplg_w->priv.data + off);
if (block_type == SKL_TYPE_TUPLE) {
@@ -3599,9 +3596,6 @@ static int skl_tplg_get_manifest_data(struct snd_soc_tplg_manifest *manifest,
block_size = ret;
off += array->size;
- array = (struct snd_soc_tplg_vendor_array *)
- (manifest->priv.data + off);
-
data = (manifest->priv.data + off);
if (block_type == SKL_TYPE_TUPLE) {
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array
2022-06-14 18:38 [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array Colin Ian King
@ 2022-06-14 18:48 ` Ranjani Sridharan
2022-06-16 11:15 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Ranjani Sridharan @ 2022-06-14 18:48 UTC (permalink / raw)
To: Colin Ian King, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Bard Liao, Kai Vehmanen, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
On Tue, 2022-06-14 at 19:38 +0100, Colin Ian King wrote:
> There are two occurrences where the pointer array is being assigned a
> value
> that is never read, the pointer gets updated in the next iteration of
> a
> loop. These assignments are redundant and can be removed.
>
> Cleans up clang scan-build warnings:
> sound/soc/intel/skylake/skl-topology.c:2953:3: warning: Value stored
> to
> 'array' is never read [deadcode.DeadStores]
> sound/soc/intel/skylake/skl-topology.c:3602:3: warning: Value stored
> to
> 'array' is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
LGTM, thanks!
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array
2022-06-14 18:38 [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array Colin Ian King
2022-06-14 18:48 ` Ranjani Sridharan
@ 2022-06-16 11:15 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-06-16 11:15 UTC (permalink / raw)
To: yung-chuan.liao, Colin Ian King, ranjani.sridharan, perex,
alsa-devel, tiwai, pierre-louis.bossart, peter.ujfalusi,
liam.r.girdwood, kai.vehmanen
Cc: kernel-janitors, linux-kernel
On Tue, 14 Jun 2022 19:38:09 +0100, Colin Ian King wrote:
> There are two occurrences where the pointer array is being assigned a value
> that is never read, the pointer gets updated in the next iteration of a
> loop. These assignments are redundant and can be removed.
>
> Cleans up clang scan-build warnings:
> sound/soc/intel/skylake/skl-topology.c:2953:3: warning: Value stored to
> 'array' is never read [deadcode.DeadStores]
> sound/soc/intel/skylake/skl-topology.c:3602:3: warning: Value stored to
> 'array' is never read [deadcode.DeadStores]
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array
commit: 1ec0c91f6d6b21703c17d5e89f32d52feac5887e
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-16 11:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-14 18:38 [PATCH] ASoC: Intel: Skylake: remove redundant re-assignments to pointer array Colin Ian King
2022-06-14 18:48 ` Ranjani Sridharan
2022-06-16 11:15 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox