mbox series

[00/20] iio: make masklength __private (round 1)

Message ID 20240702-dev-iio-masklength-private-v1-0-98193bf536a6@analog.com (mailing list archive)
Headers show
Series iio: make masklength __private (round 1) | expand

Message

Nuno Sa via B4 Relay July 2, 2024, 4:02 p.m. UTC
Hi Jonathan,

Here it goes the first round of what we discussed in [1] about
annotating .masklength as __private. Patches should be fairly simple so
hopefully I did not messed up much...

Note that in core, there's one place where we're still directly writing
into .masklength (when it's effectively set). The plan is then to
directly use ACCESS_PRIVATE() in there in the same patch where we mark
.masklength as __private.

Note this was only compile tested for arm with allyesconfig.

[1]: https://lore.kernel.org/linux-iio/20240612-dev-iio-scan-private-v1-0-7c75c8e3d30b@analog.com/

---
Nuno Sa (20):
      iio: core: add accessors  'masklength'
      iio: core: make use of iio_get_masklength()
      iio: buffer: make use of iio_get_masklength()
      iio: accel: adxl367: make use of iio_get_masklength()
      iio: accel: adx1372: make use of iio_get_masklength()
      iio: accel: bma180: make use of iio_for_each_active_channel()
      iio: accel: bmc150-accel-core: make use of iio_for_each_active_channel()
      iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength()
      iio: accel: fxls8962af-core: make use of iio_for_each_active_channel()
      iio: accel: msa311: make use of iio_for_each_active_channel()
      iio: accel: sca3300: make use of iio_for_each_active_channel()
      iio: accel: stk8312: make use of iio_for_each_active_channel()
      iio: accel: stk8ba50: make use of iio_for_each_active_channel()
      iio: adc: ad7266: make use of iio_get_masklength()
      iio: adc: ad7298: make use of iio_get_masklength()
      iio: adc: ad799x: make use of iio_get_masklength()
      iio: adc: ad_sigma_delta: use new '.masklength' accessors
      iio: adc: at91_adc: make use of iio_for_each_active_channel()
      iio: imu: adis16475: make use of iio_for_each_active_channel()
      iio: imu: adis16480: make use of iio_for_each_active_channel()

 drivers/iio/accel/adxl367.c                   |  2 +-
 drivers/iio/accel/adxl372.c                   |  2 +-
 drivers/iio/accel/bma180.c                    |  3 +-
 drivers/iio/accel/bmc150-accel-core.c         |  3 +-
 drivers/iio/accel/cros_ec_accel_legacy.c      |  2 +-
 drivers/iio/accel/fxls8962af-core.c           |  3 +-
 drivers/iio/accel/msa311.c                    |  3 +-
 drivers/iio/accel/sca3300.c                   |  3 +-
 drivers/iio/accel/stk8312.c                   |  3 +-
 drivers/iio/accel/stk8ba50.c                  |  3 +-
 drivers/iio/adc/ad7266.c                      |  3 +-
 drivers/iio/adc/ad7298.c                      |  3 +-
 drivers/iio/adc/ad799x.c                      |  3 +-
 drivers/iio/adc/ad_sigma_delta.c              |  6 ++--
 drivers/iio/adc/at91_adc.c                    |  4 +--
 drivers/iio/buffer/industrialio-buffer-cb.c   |  2 +-
 drivers/iio/buffer/industrialio-hw-consumer.c |  4 +--
 drivers/iio/imu/adis16475.c                   |  3 +-
 drivers/iio/imu/adis16480.c                   |  2 +-
 drivers/iio/industrialio-buffer.c             | 50 ++++++++++++---------------
 drivers/iio/industrialio-core.c               |  2 +-
 include/linux/iio/iio.h                       | 18 ++++++++++
 22 files changed, 67 insertions(+), 60 deletions(-)
---
base-commit: 21ab030b8f8b4704c299435e167824ec90c8bab5
change-id: 20240617-dev-iio-masklength-private-023cb295a786
--

Thanks!
- Nuno Sá

Comments

Jonathan Cameron July 2, 2024, 8:26 p.m. UTC | #1
On Tue, 02 Jul 2024 18:02:32 +0200
Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:

> Hi Jonathan,
> 
> Here it goes the first round of what we discussed in [1] about
> annotating .masklength as __private. Patches should be fairly simple so
> hopefully I did not messed up much...
> 
> Note that in core, there's one place where we're still directly writing
> into .masklength (when it's effectively set). The plan is then to
> directly use ACCESS_PRIVATE() in there in the same patch where we mark
> .masklength as __private.

Makes sense. Series looks good to me, but I'll not pick it up just yet.
I've tagged a like second 6.11 pull request, so this is probably 6.12 material
unless things go particularly smoothly and Greg takes an additional last
minute one as there is one set waiting for a fix that is in char-misc
but not yet iio-togreg.

Jonathan

> 
> Note this was only compile tested for arm with allyesconfig.
> 
> [1]: https://lore.kernel.org/linux-iio/20240612-dev-iio-scan-private-v1-0-7c75c8e3d30b@analog.com/
> 
> ---
> Nuno Sa (20):
>       iio: core: add accessors  'masklength'
>       iio: core: make use of iio_get_masklength()
>       iio: buffer: make use of iio_get_masklength()
>       iio: accel: adxl367: make use of iio_get_masklength()
>       iio: accel: adx1372: make use of iio_get_masklength()
>       iio: accel: bma180: make use of iio_for_each_active_channel()
>       iio: accel: bmc150-accel-core: make use of iio_for_each_active_channel()
>       iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength()
>       iio: accel: fxls8962af-core: make use of iio_for_each_active_channel()
>       iio: accel: msa311: make use of iio_for_each_active_channel()
>       iio: accel: sca3300: make use of iio_for_each_active_channel()
>       iio: accel: stk8312: make use of iio_for_each_active_channel()
>       iio: accel: stk8ba50: make use of iio_for_each_active_channel()
>       iio: adc: ad7266: make use of iio_get_masklength()
>       iio: adc: ad7298: make use of iio_get_masklength()
>       iio: adc: ad799x: make use of iio_get_masklength()
>       iio: adc: ad_sigma_delta: use new '.masklength' accessors
>       iio: adc: at91_adc: make use of iio_for_each_active_channel()
>       iio: imu: adis16475: make use of iio_for_each_active_channel()
>       iio: imu: adis16480: make use of iio_for_each_active_channel()
> 
>  drivers/iio/accel/adxl367.c                   |  2 +-
>  drivers/iio/accel/adxl372.c                   |  2 +-
>  drivers/iio/accel/bma180.c                    |  3 +-
>  drivers/iio/accel/bmc150-accel-core.c         |  3 +-
>  drivers/iio/accel/cros_ec_accel_legacy.c      |  2 +-
>  drivers/iio/accel/fxls8962af-core.c           |  3 +-
>  drivers/iio/accel/msa311.c                    |  3 +-
>  drivers/iio/accel/sca3300.c                   |  3 +-
>  drivers/iio/accel/stk8312.c                   |  3 +-
>  drivers/iio/accel/stk8ba50.c                  |  3 +-
>  drivers/iio/adc/ad7266.c                      |  3 +-
>  drivers/iio/adc/ad7298.c                      |  3 +-
>  drivers/iio/adc/ad799x.c                      |  3 +-
>  drivers/iio/adc/ad_sigma_delta.c              |  6 ++--
>  drivers/iio/adc/at91_adc.c                    |  4 +--
>  drivers/iio/buffer/industrialio-buffer-cb.c   |  2 +-
>  drivers/iio/buffer/industrialio-hw-consumer.c |  4 +--
>  drivers/iio/imu/adis16475.c                   |  3 +-
>  drivers/iio/imu/adis16480.c                   |  2 +-
>  drivers/iio/industrialio-buffer.c             | 50 ++++++++++++---------------
>  drivers/iio/industrialio-core.c               |  2 +-
>  include/linux/iio/iio.h                       | 18 ++++++++++
>  22 files changed, 67 insertions(+), 60 deletions(-)
> ---
> base-commit: 21ab030b8f8b4704c299435e167824ec90c8bab5
> change-id: 20240617-dev-iio-masklength-private-023cb295a786
> --
> 
> Thanks!
> - Nuno Sá
> 
>
Nuno Sá July 3, 2024, 7:10 a.m. UTC | #2
On Tue, 2024-07-02 at 21:26 +0100, Jonathan Cameron wrote:
> On Tue, 02 Jul 2024 18:02:32 +0200
> Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:
> 
> > Hi Jonathan,
> > 
> > Here it goes the first round of what we discussed in [1] about
> > annotating .masklength as __private. Patches should be fairly simple so
> > hopefully I did not messed up much...
> > 
> > Note that in core, there's one place where we're still directly writing
> > into .masklength (when it's effectively set). The plan is then to
> > directly use ACCESS_PRIVATE() in there in the same patch where we mark
> > .masklength as __private.
> 
> Makes sense. Series looks good to me, but I'll not pick it up just yet.
> I've tagged a like second 6.11 pull request, so this is probably 6.12 material
> unless things go particularly smoothly and Greg takes an additional last
> minute one as there is one set waiting for a fix that is in char-misc
> but not yet iio-togreg.
> 
> Jonathan
> 

Yeah, looks sane to me. Advantage of going in 6.12 is that (likely) we'' get all
the conversions done.

- Nuno Sá
>
Jonathan Cameron July 6, 2024, 10:33 a.m. UTC | #3
On Wed, 03 Jul 2024 09:10:58 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:

> On Tue, 2024-07-02 at 21:26 +0100, Jonathan Cameron wrote:
> > On Tue, 02 Jul 2024 18:02:32 +0200
> > Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:
> >   
> > > Hi Jonathan,
> > > 
> > > Here it goes the first round of what we discussed in [1] about
> > > annotating .masklength as __private. Patches should be fairly simple so
> > > hopefully I did not messed up much...
> > > 
> > > Note that in core, there's one place where we're still directly writing
> > > into .masklength (when it's effectively set). The plan is then to
> > > directly use ACCESS_PRIVATE() in there in the same patch where we mark
> > > .masklength as __private.  
> > 
> > Makes sense. Series looks good to me, but I'll not pick it up just yet.
> > I've tagged a like second 6.11 pull request, so this is probably 6.12 material
> > unless things go particularly smoothly and Greg takes an additional last
> > minute one as there is one set waiting for a fix that is in char-misc
> > but not yet iio-togreg.
> > 
> > Jonathan
> >   
> 
> Yeah, looks sane to me. Advantage of going in 6.12 is that (likely) we'' get all
> the conversions done.

Given I'm not planning to send another pull request (no time for suitable
testing in linux-next etc) for 6.11 I've started queuing up as probable
6.12 material.

Usual process applies at this stage - I won't be pushing out as togreg
until I can rebase on rc1.

Applied and pushed out as testing for now with the typo Alexandru
pointed out in adxl372 fixed up.

Jonathan
> 
> - Nuno Sá
> >   
>