* [PATCH] ASoC: SOF: sof-audio: remove useless assignment
@ 2022-04-21 16:26 Pierre-Louis Bossart
2022-04-22 23:17 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Louis Bossart @ 2022-04-21 16:26 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, Bard Liao, Pierre-Louis Bossart, Rander Wang, broonie,
Péter Ujfalusi
There is no need to assign spcm to NULL. Removing this assignment also
removes a false alarm reported by cppcheck.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
sound/soc/sof/sof-audio.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 0898f4dbe29f8..a0af7c421fd9b 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -404,8 +404,7 @@ struct snd_sof_pcm *snd_sof_find_spcm_dai(struct snd_soc_component *scomp,
struct snd_soc_pcm_runtime *rtd)
{
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
-
- struct snd_sof_pcm *spcm = NULL;
+ struct snd_sof_pcm *spcm;
list_for_each_entry(spcm, &sdev->pcm_list, list) {
if (le32_to_cpu(spcm->pcm.dai_id) == rtd->dai_link->id)
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: SOF: sof-audio: remove useless assignment
2022-04-21 16:26 [PATCH] ASoC: SOF: sof-audio: remove useless assignment Pierre-Louis Bossart
@ 2022-04-22 23:17 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-04-22 23:17 UTC (permalink / raw)
To: alsa-devel, pierre-louis.bossart
Cc: tiwai, peter.ujfalusi, yung-chuan.liao, rander.wang
On Thu, 21 Apr 2022 11:26:00 -0500, Pierre-Louis Bossart wrote:
> There is no need to assign spcm to NULL. Removing this assignment also
> removes a false alarm reported by cppcheck.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: sof-audio: remove useless assignment
commit: d516e96bdeca103224de2f84685bf733953b6303
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] 2+ messages in thread
end of thread, other threads:[~2022-04-22 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 16:26 [PATCH] ASoC: SOF: sof-audio: remove useless assignment Pierre-Louis Bossart
2022-04-22 23:17 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.