linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alexandru Ardelean <aardelean@deviqon.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	denis.ciocca@st.com
Subject: Re: [PATCH 0/4] iio: st_sensors: convert probe functions to full devm
Date: Sat, 31 Jul 2021 18:40:24 +0100	[thread overview]
Message-ID: <20210731184024.454ad962@jic23-huawei> (raw)
In-Reply-To: <20210726071404.14529-1-aardelean@deviqon.com>

On Mon, 26 Jul 2021 10:14:00 +0300
Alexandru Ardelean <aardelean@deviqon.com> wrote:

> Continuing from series:
>   https://lore.kernel.org/linux-iio/20210720074642.223293-1-aardelean@deviqon.com/
> 
> This goes a little further and converts all ST drivers using the st_common
> bits to devm functions.
> As mentioned by Jonathan, the devm unwind is often attached to
> iio_dev->dev.parent, and something it's attached to some other pointer
> which references the same device object.
> 
> In the last patch, that point is removed, to eliminate doubt about this
> mix-n-match.
> An alternative would be an assert/check somewhere to ensure that
> 'iio_dev->dev.parent == adata->dev'. But I [personally] don't like it that
> much.
> 
> As mentioned previously, I was also thinking of sending this set with the
> previous one. But I am usually reserved to send large sets; also, because I
> don't really like to review large sets [when I'm reviewing other people's
> code].

I'm fine with this, though I would like the reorder pulled out as as
separate patch and moved to the front of the series. It's a good change
in it's own right and will also make the rest of the series more 'obviously'
correct as you'll always be stripping off the last thing done in remove.

Otherwise, needs some time for others to take a look.

thanks,

Jonathan

> 
> Alexandru Ardelean (4):
>   iio: st_sensors: remove st_sensors_deallocate_trigger() function
>   iio: st_sensors: remove st_sensors_power_disable() function
>   iio: st_sensors: remove all driver remove functions
>   iio: st_sensors: remove reference to parent device object on
>     st_sensor_data
> 
>  drivers/iio/accel/st_accel_core.c             | 32 +++--------
>  drivers/iio/accel/st_accel_i2c.c              | 23 +-------
>  drivers/iio/accel/st_accel_spi.c              | 23 +-------
>  .../iio/common/st_sensors/st_sensors_core.c   | 34 ++++++------
>  .../iio/common/st_sensors/st_sensors_i2c.c    |  1 -
>  .../iio/common/st_sensors/st_sensors_spi.c    |  1 -
>  .../common/st_sensors/st_sensors_trigger.c    | 53 +++++++------------
>  drivers/iio/gyro/st_gyro_core.c               | 27 ++--------
>  drivers/iio/gyro/st_gyro_i2c.c                | 23 +-------
>  drivers/iio/gyro/st_gyro_spi.c                | 23 +-------
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.h       |  1 -
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c  | 17 +-----
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c   |  6 ---
>  drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c   |  6 ---
>  drivers/iio/magnetometer/st_magn_core.c       | 29 ++--------
>  drivers/iio/magnetometer/st_magn_i2c.c        | 23 +-------
>  drivers/iio/magnetometer/st_magn_spi.c        | 23 +-------
>  drivers/iio/pressure/st_pressure_core.c       | 27 ++--------
>  drivers/iio/pressure/st_pressure_i2c.c        | 23 +-------
>  drivers/iio/pressure/st_pressure_spi.c        | 23 +-------
>  include/linux/iio/common/st_sensors.h         | 13 -----
>  21 files changed, 60 insertions(+), 371 deletions(-)
> 


      parent reply	other threads:[~2021-07-31 17:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  7:14 [PATCH 0/4] iio: st_sensors: convert probe functions to full devm Alexandru Ardelean
2021-07-26  7:14 ` [PATCH 1/4] iio: st_sensors: remove st_sensors_deallocate_trigger() function Alexandru Ardelean
2021-07-26  7:14 ` [PATCH 2/4] iio: st_sensors: remove st_sensors_power_disable() function Alexandru Ardelean
2021-07-31 17:37   ` Jonathan Cameron
2021-08-02  7:30     ` Alexandru Ardelean
2021-08-16  7:48       ` Alexandru Ardelean
2021-08-16  8:53         ` Jonathan Cameron
2021-07-26  7:14 ` [PATCH 3/4] iio: st_sensors: remove all driver remove functions Alexandru Ardelean
2021-07-26  7:20   ` Andy Shevchenko
2021-07-26  7:14 ` [PATCH 4/4] iio: st_sensors: remove reference to parent device object on st_sensor_data Alexandru Ardelean
2021-07-31 17:40 ` 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=20210731184024.454ad962@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=aardelean@deviqon.com \
    --cc=denis.ciocca@st.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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).