* [PATCH] ASoC: amd: acp: delete unnecessary NULL check
@ 2023-07-18 7:04 Dan Carpenter
2023-07-18 18:46 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-07-18 7:04 UTC (permalink / raw)
To: Liam Girdwood
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Syed Saba Kareem,
Nicolas Ferre, Uwe Kleine-König, Yang Li, alsa-devel,
kernel-janitors
The list iterator can't be NULL. Delete the check and pull the code
in one tab.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
sound/soc/amd/acp/acp-rembrandt.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c
index 21e67ed956d1..cc8284f417c0 100644
--- a/sound/soc/amd/acp/acp-rembrandt.c
+++ b/sound/soc/amd/acp/acp-rembrandt.c
@@ -266,18 +266,16 @@ static int __maybe_unused rmb_pcm_resume(struct device *dev)
acp6x_master_clock_generate(dev);
spin_lock(&adata->acp_lock);
list_for_each_entry(stream, &adata->stream_list, list) {
- if (stream) {
- substream = stream->substream;
- if (substream && substream->runtime) {
- buf_in_frames = (substream->runtime->buffer_size);
- buf_size = frames_to_bytes(substream->runtime, buf_in_frames);
- config_pte_for_stream(adata, stream);
- config_acp_dma(adata, stream, buf_size);
- if (stream->dai_id)
- restore_acp_i2s_params(substream, adata, stream);
- else
- restore_acp_pdm_params(substream, adata);
- }
+ substream = stream->substream;
+ if (substream && substream->runtime) {
+ buf_in_frames = (substream->runtime->buffer_size);
+ buf_size = frames_to_bytes(substream->runtime, buf_in_frames);
+ config_pte_for_stream(adata, stream);
+ config_acp_dma(adata, stream, buf_size);
+ if (stream->dai_id)
+ restore_acp_i2s_params(substream, adata, stream);
+ else
+ restore_acp_pdm_params(substream, adata);
}
}
spin_unlock(&adata->acp_lock);
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: amd: acp: delete unnecessary NULL check
2023-07-18 7:04 [PATCH] ASoC: amd: acp: delete unnecessary NULL check Dan Carpenter
@ 2023-07-18 18:46 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-07-18 18:46 UTC (permalink / raw)
To: Liam Girdwood, Dan Carpenter
Cc: Jaroslav Kysela, Takashi Iwai, Syed Saba Kareem, Nicolas Ferre,
Uwe Kleine-König, Yang Li, alsa-devel, kernel-janitors
On Tue, 18 Jul 2023 10:04:18 +0300, Dan Carpenter wrote:
> The list iterator can't be NULL. Delete the check and pull the code
> in one tab.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: acp: delete unnecessary NULL check
commit: c1325a2d5182f263f2edbc6e0c1e581e4c5d5a95
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:[~2023-07-18 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-18 7:04 [PATCH] ASoC: amd: acp: delete unnecessary NULL check Dan Carpenter
2023-07-18 18:46 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).