All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs35l41: Make cs35l41_remove() return void
@ 2021-10-20 13:24 Uwe Kleine-König
  2021-10-25 16:39 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-10-20 13:24 UTC (permalink / raw)
  To: James Schulman, David Rhodes, Liam Girdwood, Mark Brown
  Cc: alsa-devel, kernel

Up to now cs35l41_remove() returns zero unconditionally. Make it
return void instead which makes it easier to see in the callers that
there is no error to handle.

Also the return value of i2c, platform and spi remove callbacks is
ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 sound/soc/codecs/cs35l41-i2c.c | 4 +++-
 sound/soc/codecs/cs35l41-spi.c | 4 +++-
 sound/soc/codecs/cs35l41.c     | 4 +---
 sound/soc/codecs/cs35l41.h     | 2 +-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/cs35l41-i2c.c b/sound/soc/codecs/cs35l41-i2c.c
index 2f3d1bd8e046..d5fa8d2c4a70 100644
--- a/sound/soc/codecs/cs35l41-i2c.c
+++ b/sound/soc/codecs/cs35l41-i2c.c
@@ -75,7 +75,9 @@ static int cs35l41_i2c_remove(struct i2c_client *client)
 {
 	struct cs35l41_private *cs35l41 = i2c_get_clientdata(client);
 
-	return cs35l41_remove(cs35l41);
+	cs35l41_remove(cs35l41);
+
+	return 0;
 }
 
 #ifdef CONFIG_OF
diff --git a/sound/soc/codecs/cs35l41-spi.c b/sound/soc/codecs/cs35l41-spi.c
index eac64779eea8..90a921f726c3 100644
--- a/sound/soc/codecs/cs35l41-spi.c
+++ b/sound/soc/codecs/cs35l41-spi.c
@@ -100,7 +100,9 @@ static int cs35l41_spi_remove(struct spi_device *spi)
 {
 	struct cs35l41_private *cs35l41 = spi_get_drvdata(spi);
 
-	return cs35l41_remove(cs35l41);
+	cs35l41_remove(cs35l41);
+
+	return 0;
 }
 
 #ifdef CONFIG_OF
diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index b16eb6610c0e..94ed21d7676f 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -1433,13 +1433,11 @@ int cs35l41_probe(struct cs35l41_private *cs35l41,
 	return ret;
 }
 
-int cs35l41_remove(struct cs35l41_private *cs35l41)
+void cs35l41_remove(struct cs35l41_private *cs35l41)
 {
 	regmap_write(cs35l41->regmap, CS35L41_IRQ1_MASK1, 0xFFFFFFFF);
 	regulator_bulk_disable(CS35L41_NUM_SUPPLIES, cs35l41->supplies);
 	gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
-
-	return 0;
 }
 
 MODULE_DESCRIPTION("ASoC CS35L41 driver");
diff --git a/sound/soc/codecs/cs35l41.h b/sound/soc/codecs/cs35l41.h
index 0e2639d6ef19..6cffe8a55beb 100644
--- a/sound/soc/codecs/cs35l41.h
+++ b/sound/soc/codecs/cs35l41.h
@@ -770,6 +770,6 @@ struct cs35l41_private {
 
 int cs35l41_probe(struct cs35l41_private *cs35l41,
 		  struct cs35l41_platform_data *pdata);
-int cs35l41_remove(struct cs35l41_private *cs35l41);
+void cs35l41_remove(struct cs35l41_private *cs35l41);
 
 #endif /*__CS35L41_H__*/
-- 
2.30.2


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

* Re: [PATCH] ASoC: cs35l41: Make cs35l41_remove() return void
  2021-10-20 13:24 [PATCH] ASoC: cs35l41: Make cs35l41_remove() return void Uwe Kleine-König
@ 2021-10-25 16:39 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-10-25 16:39 UTC (permalink / raw)
  To: David Rhodes, Liam Girdwood, James Schulman, Uwe Kleine-König
  Cc: alsa-devel, Mark Brown, kernel

On Wed, 20 Oct 2021 15:24:16 +0200, Uwe Kleine-König wrote:
> Up to now cs35l41_remove() returns zero unconditionally. Make it
> return void instead which makes it easier to see in the callers that
> there is no error to handle.
> 
> Also the return value of i2c, platform and spi remove callbacks is
> ignored anyway.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: cs35l41: Make cs35l41_remove() return void
      commit: ca7270a7b60dfb25b7fd180d93ea18eebd5edee7

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:[~2021-10-25 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 13:24 [PATCH] ASoC: cs35l41: Make cs35l41_remove() return void Uwe Kleine-König
2021-10-25 16:39 ` 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.