From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <ardeleanalex@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Dan Robertson" <dan@dlrobertson.com>,
"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 <linux-iio@vger.kernel.org>,
linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH 00/15] iio: let spi drivers return 0 in .remove()
Date: Thu, 14 Oct 2021 18:35:22 +0100 [thread overview]
Message-ID: <20211014183522.326ebab9@jic23-huawei> (raw)
In-Reply-To: <CA+U=DspB=++La907hoL8Uzf89uZzoC1rz=vXPX6FQ-voDPBROQ@mail.gmail.com>
On Thu, 14 Oct 2021 10:45:36 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
> On Wed, Oct 13, 2021 at 11:33 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > Hello,
> >
> > this series is part of my quest to change the return type of the spi
> > driver .remove() callback to void. In this first stage I fix all drivers
> > to return 0 to be able to mechanically change all drivers in the final
> > step.
> >
> > Returning an error code (which actually very few drivers do) doesn't
> > make much sense, because the only effect is that the spi core emits an
> > error message.
> >
> > The same holds try for i2c drivers, some of them are fixed en passant.
> >
> > There are no interdependencies in this series, and there is some more
> > work to do for the final conversion, so apply the patches from this
> > series at will :-)
> >
>
> Series looks good.
> However this set also makes a case for doing more conversions to devm_
> usage in probe.
Indeed. 2 of these were already done :)
Rest of the series applied to the togreg branch of iio.git and pushed out
as testing for 0-day to poke at it and see if we missed anything.
Thanks,
Jonathan
>
> With devm_ , we get slightly less code, with some mirrored unwinding
> in error and remove paths.
> There are currently ~170 places (not necessarily the same amount of
> drivers), where devm_ can be used.
>
> What I typically do is run this command in a kernel tree: "git grep
> -w iio_device_unregister | wc -l"
> When I run it without "wc -l", I will pick a file and take a look
> inside it and check it's convertibility to using
> devm_iio_device_unregister()
> The rationale is, that for IIO drivers, if you get
> devm_iio_device_unregister() (properly) called last, then it's fully
> converted to devm_ functions.
>
> For this series particularly:
>
> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
>
> > Best regards
> > Uwe
> >
> > Uwe Kleine-König (15):
> > iio: accel: bma400: Make bma400_remove() return void
> > iio: accel: bmc150: Make bmc150_accel_core_remove() return void
> > iio: accel: bmi088: Make bmi088_accel_core_remove() return void
> > iio: accel: kxsd9: Make kxsd9_common_remove() return void
> > iio: accel: mma7455: Make mma7455_core_remove() return void
> > iio: accel: ad5064: Make ad5064_core_remove() return void
> > iio: dac: ad5380: Make ad5380_remove() return void
> > iio: dac: ad5446: Make ad5446_remove() return void
> > iio: dac: ad5592r: Make ad5592r_remove() return void
> > iio: dac: ad5686: Make ad5686_remove() return void
> > iio: health: afe4403: Don't return an error in .remove()
> > iio: imu: st_lsm9ds0: Make st_lsm9ds0_remove() return void
> > iio: magn: hmc5843: Make hmc5843_common_remove() return void
> > iio: potentiometer: max5487: Don't return an error in .remove()
> > iio: pressure: ms5611: Make ms5611_remove() return void
> >
> > drivers/iio/accel/bma400.h | 2 +-
> > drivers/iio/accel/bma400_core.c | 7 ++++---
> > drivers/iio/accel/bma400_i2c.c | 4 +++-
> > drivers/iio/accel/bma400_spi.c | 4 +++-
> > drivers/iio/accel/bmc150-accel-core.c | 4 +---
> > drivers/iio/accel/bmc150-accel-i2c.c | 4 +++-
> > drivers/iio/accel/bmc150-accel-spi.c | 4 +++-
> > drivers/iio/accel/bmc150-accel.h | 2 +-
> > drivers/iio/accel/bmi088-accel-core.c | 4 +---
> > drivers/iio/accel/bmi088-accel-spi.c | 4 +++-
> > drivers/iio/accel/bmi088-accel.h | 2 +-
> > drivers/iio/accel/kxsd9-i2c.c | 4 +++-
> > drivers/iio/accel/kxsd9-spi.c | 4 +++-
> > drivers/iio/accel/kxsd9.c | 4 +---
> > drivers/iio/accel/kxsd9.h | 2 +-
> > drivers/iio/accel/mma7455.h | 2 +-
> > drivers/iio/accel/mma7455_core.c | 4 +---
> > drivers/iio/accel/mma7455_i2c.c | 4 +++-
> > drivers/iio/accel/mma7455_spi.c | 4 +++-
> > drivers/iio/dac/ad5064.c | 12 +++++++-----
> > drivers/iio/dac/ad5380.c | 15 ++++++++-------
> > drivers/iio/dac/ad5446.c | 12 +++++++-----
> > drivers/iio/dac/ad5592r-base.c | 4 +---
> > drivers/iio/dac/ad5592r-base.h | 2 +-
> > drivers/iio/dac/ad5592r.c | 4 +++-
> > drivers/iio/dac/ad5593r.c | 4 +++-
> > drivers/iio/dac/ad5686-spi.c | 4 +++-
> > drivers/iio/dac/ad5686.c | 4 +---
> > drivers/iio/dac/ad5686.h | 2 +-
> > drivers/iio/dac/ad5696-i2c.c | 4 +++-
> > drivers/iio/health/afe4403.c | 6 ++----
> > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.h | 2 +-
> > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 4 +---
> > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 4 +++-
> > drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 4 +++-
> > drivers/iio/magnetometer/hmc5843.h | 2 +-
> > drivers/iio/magnetometer/hmc5843_core.c | 4 +---
> > drivers/iio/magnetometer/hmc5843_i2c.c | 4 +++-
> > drivers/iio/magnetometer/hmc5843_spi.c | 4 +++-
> > drivers/iio/potentiometer/max5487.c | 7 ++++++-
> > drivers/iio/pressure/ms5611.h | 2 +-
> > drivers/iio/pressure/ms5611_core.c | 4 +---
> > drivers/iio/pressure/ms5611_i2c.c | 4 +++-
> > drivers/iio/pressure/ms5611_spi.c | 4 +++-
> > 44 files changed, 110 insertions(+), 81 deletions(-)
> >
> >
> > base-commit: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896
> > --
> > 2.30.2
> >
prev parent reply other threads:[~2021-10-14 17:31 UTC|newest]
Thread overview: 17+ 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 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
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 12/15] iio: imu: st_lsm9ds0: Make st_lsm9ds0_remove() " 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 15/15] iio: pressure: ms5611: Make ms5611_remove() " 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 [this message]
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=20211014183522.326ebab9@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=ardeleanalex@gmail.com \
--cc=broonie@kernel.org \
--cc=dan@dlrobertson.com \
--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).