All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream()
@ 2023-06-01 12:49 Richard Fitzgerald
  2023-06-01 14:08 ` Pierre-Louis Bossart
  2023-06-01 15:44 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2023-06-01 12:49 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel, patches, Richard Fitzgerald

The dma pointer must be set to the passed stream pointer, even
if that pointer is NULL.

Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/cs35l56.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
index 3c07bd1e959e..c03f9d3c9a13 100644
--- a/sound/soc/codecs/cs35l56.c
+++ b/sound/soc/codecs/cs35l56.c
@@ -704,9 +704,6 @@ static int cs35l56_sdw_dai_hw_free(struct snd_pcm_substream *substream,
 static int cs35l56_sdw_dai_set_stream(struct snd_soc_dai *dai,
 				      void *sdw_stream, int direction)
 {
-	if (!sdw_stream)
-		return 0;
-
 	snd_soc_dai_dma_data_set(dai, direction, sdw_stream);
 
 	return 0;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream()
  2023-06-01 12:49 [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream() Richard Fitzgerald
@ 2023-06-01 14:08 ` Pierre-Louis Bossart
  2023-06-01 15:44 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2023-06-01 14:08 UTC (permalink / raw)
  To: Richard Fitzgerald, broonie; +Cc: alsa-devel, linux-kernel, patches



On 6/1/23 07:49, Richard Fitzgerald wrote:
> The dma pointer must be set to the passed stream pointer, even
> if that pointer is NULL.
> 
> Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Yep, good catch, this is what we have for other codecs.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  sound/soc/codecs/cs35l56.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c
> index 3c07bd1e959e..c03f9d3c9a13 100644
> --- a/sound/soc/codecs/cs35l56.c
> +++ b/sound/soc/codecs/cs35l56.c
> @@ -704,9 +704,6 @@ static int cs35l56_sdw_dai_hw_free(struct snd_pcm_substream *substream,
>  static int cs35l56_sdw_dai_set_stream(struct snd_soc_dai *dai,
>  				      void *sdw_stream, int direction)
>  {
> -	if (!sdw_stream)
> -		return 0;
> -
>  	snd_soc_dai_dma_data_set(dai, direction, sdw_stream);
>  
>  	return 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream()
  2023-06-01 12:49 [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream() Richard Fitzgerald
  2023-06-01 14:08 ` Pierre-Louis Bossart
@ 2023-06-01 15:44 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-06-01 15:44 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: alsa-devel, linux-kernel, patches

On Thu, 01 Jun 2023 13:49:07 +0100, Richard Fitzgerald wrote:
> The dma pointer must be set to the passed stream pointer, even
> if that pointer is NULL.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream()
      commit: 524306c3764276ce6cc7509908934982ce167039

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:[~2023-06-01 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 12:49 [PATCH] ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream() Richard Fitzgerald
2023-06-01 14:08 ` Pierre-Louis Bossart
2023-06-01 15:44 ` 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.