linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Mark Brown <broonie@kernel.org>, Wolfram Sang <wsa@kernel.org>,
	kernel@pengutronix.de, linux-i2c@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH 06/15] iio: accel: ad5064: Make ad5064_core_remove() return void
Date: Thu, 14 Oct 2021 18:29:30 +0100	[thread overview]
Message-ID: <20211014182930.5fddd8a3@jic23-huawei> (raw)
In-Reply-To: <20211013203223.2694577-7-u.kleine-koenig@pengutronix.de>

On Wed, 13 Oct 2021 22:32:14 +0200
Uwe Kleine-König         <u.kleine-koenig@pengutronix.de> wrote:

> Up to now ad5064_core_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 and spi remove callbacks is ignored anyway.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Skipping this one as it has since been converted to all devm_

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad5064.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
> index dff623b65e4f..6f66796942c0 100644
> --- a/drivers/iio/dac/ad5064.c
> +++ b/drivers/iio/dac/ad5064.c
> @@ -900,7 +900,7 @@ static int ad5064_probe(struct device *dev, enum ad5064_type type,
>  	return ret;
>  }
>  
> -static int ad5064_remove(struct device *dev)
> +static void ad5064_remove(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = dev_get_drvdata(dev);
>  	struct ad5064_state *st = iio_priv(indio_dev);
> @@ -909,8 +909,6 @@ static int ad5064_remove(struct device *dev)
>  
>  	if (!st->use_internal_vref)
>  		regulator_bulk_disable(ad5064_num_vref(st), st->vref_reg);
> -
> -	return 0;
>  }
>  
>  #if IS_ENABLED(CONFIG_SPI_MASTER)
> @@ -934,7 +932,9 @@ static int ad5064_spi_probe(struct spi_device *spi)
>  
>  static int ad5064_spi_remove(struct spi_device *spi)
>  {
> -	return ad5064_remove(&spi->dev);
> +	ad5064_remove(&spi->dev);
> +
> +	return 0;
>  }
>  
>  static const struct spi_device_id ad5064_spi_ids[] = {
> @@ -1021,7 +1021,9 @@ static int ad5064_i2c_probe(struct i2c_client *i2c,
>  
>  static int ad5064_i2c_remove(struct i2c_client *i2c)
>  {
> -	return ad5064_remove(&i2c->dev);
> +	ad5064_remove(&i2c->dev);
> +
> +	return 0;
>  }
>  
>  static const struct i2c_device_id ad5064_i2c_ids[] = {


  reply	other threads:[~2021-10-14 17:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 20:32 [PATCH 00/15] iio: let spi drivers return 0 in .remove() Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 01/15] iio: accel: bma400: Make bma400_remove() return void Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 02/15] iio: accel: bmc150: Make bmc150_accel_core_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 03/15] iio: accel: bmi088: Make bmi088_accel_core_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 04/15] iio: accel: kxsd9: Make kxsd9_common_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 05/15] iio: accel: mma7455: Make mma7455_core_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 06/15] iio: accel: ad5064: Make ad5064_core_remove() " Uwe Kleine-König
2021-10-14 17:29   ` Jonathan Cameron [this message]
2021-10-13 20:32 ` [PATCH 07/15] iio: dac: ad5380: Make ad5380_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 08/15] iio: dac: ad5446: Make ad5446_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 09/15] iio: dac: ad5592r: Make ad5592r_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 10/15] iio: dac: ad5686: Make ad5686_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 11/15] iio: health: afe4403: Don't return an error in .remove() Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 12/15] iio: imu: st_lsm9ds0: Make st_lsm9ds0_remove() return void Uwe Kleine-König
2021-10-14 17:32   ` Jonathan Cameron
2021-10-13 20:32 ` [PATCH 13/15] iio: magn: hmc5843: Make hmc5843_common_remove() " Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 14/15] iio: potentiometer: max5487: Don't return an error in .remove() Uwe Kleine-König
2021-10-13 20:32 ` [PATCH 15/15] iio: pressure: ms5611: Make ms5611_remove() return void Uwe Kleine-König
2021-10-14  7:45 ` [PATCH 00/15] iio: let spi drivers return 0 in .remove() Alexandru Ardelean
2021-10-14 17:35   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211014182930.5fddd8a3@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).