mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Raffaele Tranfaglia via B4 Relay
	<devnull+raffaele.tranfaglia.gmail.com@kernel.org>
Cc: raffaele.tranfaglia@gmail.com, "Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux@analog.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Joshua Crofts" <crofts@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v3 0/2] iio: light: adux1020: guard() conversion and follow-up cleanup
Date: Thu, 19 Nov 2026 01:33:33 +0000	[thread overview]
Message-ID: <20261119013333.333a1896@jic23-hlaptop> (raw)
In-Reply-To: <20261118-adux1020-guard-v3-0-2c6a18954fc7@gmail.com>

On Wed, 18 Nov 2026 07:29:53 +0000
Raffaele Tranfaglia via B4 Relay <devnull+raffaele.tranfaglia.gmail.com@kernel.org> wrote:

> Patch 1 converts the driver to guard(mutex), as Jonathan suggested
> when applying the sampling frequency hardening patch. Patch 2 uses the
> direct returns this allows to flatten the channel type checks in
> adux1020_read_raw() and adux1020_write_raw().
> 
> Tested on arm64 QEMU with i2c-stub and lockdep enabled: reading and
> writing the sampling frequency (valid and invalid values), reading the
> LED current, reading in_proximity_raw and enabling the threshold
> event. No lockdep warnings and no hangs after the error paths.
> 
> I prepared these patches with the help of an AI coding assistant, and
> reviewed and tested them myself.
> 
> Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
Applied to the testing branch of iio.git

Thanks,

Jonathan

> ---
> Changes in v3:
> - Patch 2: add a local regmap pointer in adux1020_read_raw() and
>   adux1020_write_raw(), and use 'if (ret)' for regmap_read() errors
>   (Andy)
> - Patch 2: split the adux1020_find_index() arguments logically (Andy)
> - Link to v2: https://patch.msgid.link/20261117-adux1020-guard-v2-0-89707fa070c9@gmail.com
> 
> Changes in v2:
> - Drop the unreferenced Link tag (Andy)
> - Move ret to the end of the declarations in adux1020_read_raw() (Andy)
> - New patch 2: return early on unsupported channel types instead of
>   nesting (Jonathan)
> - Link to v1: https://patch.msgid.link/20261108-adux1020-guard-v1-1-db9c582f1eea@gmail.com
> 
> ---
> Raffaele Tranfaglia (2):
>       iio: light: adux1020: use guard() to simplify lock handling
>       iio: light: adux1020: return early on unsupported channel types
> 
>  drivers/iio/light/adux1020.c | 189 ++++++++++++++++++-------------------------
>  1 file changed, 77 insertions(+), 112 deletions(-)
> ---
> base-commit: d922ed738439e1d5b4701df7f4cdd49a09925624
> change-id: 20261108-adux1020-guard-3820ce794843
> 
> Best regards,
> --  
> Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
> 
> 


      parent reply	other threads:[~2026-11-19  1:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  7:29 Raffaele Tranfaglia via B4 Relay
2026-11-18  7:29 ` [PATCH v3 1/2] iio: light: adux1020: use guard() to simplify lock handling Raffaele Tranfaglia via B4 Relay
2026-11-18  7:29 ` [PATCH v3 2/2] iio: light: adux1020: return early on unsupported channel types Raffaele Tranfaglia via B4 Relay
2026-11-19  1:33 ` 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=20261119013333.333a1896@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=crofts@kernel.org \
    --cc=devnull+raffaele.tranfaglia.gmail.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=raffaele.tranfaglia@gmail.com \
    /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

all inboxes | Powered by JetHome®