All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void
@ 2022-06-05 15:39 Uwe Kleine-König
  2022-06-06 13:45 ` Pierre-Louis Bossart
  2022-06-07 14:11 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-06-05 15:39 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown
  Cc: alsa-devel, Takashi Iwai, kernel

broadwell_disable_jack() returns zero unconditionally. Letting it
return void instead makes it easier to see in the callers that there is no
error to handle.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 sound/soc/intel/boards/broadwell.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
index d37c74fd1a3c..280e84bbe185 100644
--- a/sound/soc/intel/boards/broadwell.c
+++ b/sound/soc/intel/boards/broadwell.c
@@ -227,7 +227,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
 	},
 };
 
-static int broadwell_disable_jack(struct snd_soc_card *card)
+static void broadwell_disable_jack(struct snd_soc_card *card)
 {
 	struct snd_soc_component *component;
 
@@ -239,13 +239,13 @@ static int broadwell_disable_jack(struct snd_soc_card *card)
 			break;
 		}
 	}
-
-	return 0;
 }
 
 static int broadwell_suspend(struct snd_soc_card *card)
 {
-	return broadwell_disable_jack(card);
+	broadwell_disable_jack(card);
+
+	return 0;
 }
 
 static int broadwell_resume(struct snd_soc_card *card){
@@ -315,7 +315,9 @@ static int broadwell_audio_remove(struct platform_device *pdev)
 {
 	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
-	return broadwell_disable_jack(card);
+	broadwell_disable_jack(card);
+
+	return 0;
 }
 
 static struct platform_driver broadwell_audio = {

base-commit: 4b0986a3613c92f4ec1bdc7f60ec66fea135991f
-- 
2.36.1


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

* Re: [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void
  2022-06-05 15:39 [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void Uwe Kleine-König
@ 2022-06-06 13:45 ` Pierre-Louis Bossart
  2022-06-07 14:11 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2022-06-06 13:45 UTC (permalink / raw)
  To: Uwe Kleine-König, Cezary Rojewski, Liam Girdwood, Jie Yang,
	Mark Brown
  Cc: alsa-devel, Takashi Iwai, kernel



On 6/5/22 10:39, Uwe Kleine-König wrote:
> broadwell_disable_jack() returns zero unconditionally. Letting it
> return void instead makes it easier to see in the callers that there is no
> error to handle.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

> ---
>  sound/soc/intel/boards/broadwell.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
> index d37c74fd1a3c..280e84bbe185 100644
> --- a/sound/soc/intel/boards/broadwell.c
> +++ b/sound/soc/intel/boards/broadwell.c
> @@ -227,7 +227,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
>  	},
>  };
>  
> -static int broadwell_disable_jack(struct snd_soc_card *card)
> +static void broadwell_disable_jack(struct snd_soc_card *card)
>  {
>  	struct snd_soc_component *component;
>  
> @@ -239,13 +239,13 @@ static int broadwell_disable_jack(struct snd_soc_card *card)
>  			break;
>  		}
>  	}
> -
> -	return 0;
>  }
>  
>  static int broadwell_suspend(struct snd_soc_card *card)
>  {
> -	return broadwell_disable_jack(card);
> +	broadwell_disable_jack(card);
> +
> +	return 0;
>  }
>  
>  static int broadwell_resume(struct snd_soc_card *card){
> @@ -315,7 +315,9 @@ static int broadwell_audio_remove(struct platform_device *pdev)
>  {
>  	struct snd_soc_card *card = platform_get_drvdata(pdev);
>  
> -	return broadwell_disable_jack(card);
> +	broadwell_disable_jack(card);
> +
> +	return 0;
>  }
>  
>  static struct platform_driver broadwell_audio = {
> 
> base-commit: 4b0986a3613c92f4ec1bdc7f60ec66fea135991f

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

* Re: [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void
  2022-06-05 15:39 [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void Uwe Kleine-König
  2022-06-06 13:45 ` Pierre-Louis Bossart
@ 2022-06-07 14:11 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-06-07 14:11 UTC (permalink / raw)
  To: cezary.rojewski, pierre-louis.bossart, liam.r.girdwood,
	Uwe Kleine-König, yang.jie
  Cc: alsa-devel, tiwai, kernel

On Sun, 5 Jun 2022 17:39:04 +0200, Uwe Kleine-König wrote:
> broadwell_disable_jack() returns zero unconditionally. Letting it
> return void instead makes it easier to see in the callers that there is no
> error to handle.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void
      commit: aa0d5f095093610e7274591d41a28381f60467a8

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-07 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 15:39 [PATCH] ASoC: Intel: broadwell: Make broadwell_disable_jack() return void Uwe Kleine-König
2022-06-06 13:45 ` Pierre-Louis Bossart
2022-06-07 14:11 ` 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.