Devicetree
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Rodrigo Alencar <455.rodrigo.alencar@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
	rodrigo.alencar@analog.com, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	David Lechner <dlechner@baylibre.com>,
	Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 3/6] iio: amplifiers: ad8366: refactor device resource management
Date: Thu, 29 Jan 2026 18:40:25 +0000	[thread overview]
Message-ID: <20260129184025.4abd4fe0@jic23-huawei> (raw)
In-Reply-To: <rtu3nsjdufyhtox5uvtkoyzqtfcmq2wdfzmsr3xyvqlrdloirn@a3jdshanc7ha>

On Wed, 28 Jan 2026 09:31:10 +0000
Rodrigo Alencar <455.rodrigo.alencar@gmail.com> wrote:

> On 26/01/27 11:12PM, Andy Shevchenko wrote:
> > On Mon, Jan 26, 2026 at 01:51:04PM +0000, Rodrigo Alencar via B4 Relay wrote:
> >   
> > > Adhere modern device resource management with the following:
> > > - Voltage regulator managed and enabled internally;
> > > - Proper mutex lifecycle with devm_mutex_init(), replacing mutex_init();
> > > - IIO device registration handled with devm_iio_device_register();
> > > - removal of goto's from the probe function;
> > > - ad8366_remove() removed as it is not needed anymore;
> > > 
> > > Also, dev_err_probe() is used to report probe errors with created local
> > > device pointer.  
> > 
> > And also it uses the temporary dev variable in the cases that are not covered
> > by the above.
> > 
> > So, three changes in one patch...  
> 
> I can split. Using proper devm functions allowed me to drop goto's and
> ad8366_remove(). Dropping the goto's allowed for the usage of
> dev_err_probe().

As general rule I prefer one patch one change, though just occasionally
I'll take the expedient view if a series is otherwise ready to merge
and one change is really really small.

J
> 
> I could place the temporary dev variable in a separate patch. 
> 
> > 
> > Dunno if Jonathan is okay with this. I would rather split it.
> > Code wise LGTM.  
> 
> Yeah I can now see it coming. Thanks for the review.
> 


  reply	other threads:[~2026-01-29 18:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-26 13:51 [PATCH v2 0/6] iio: amplifiers: ad8366: driver update and dt support Rodrigo Alencar via B4 Relay
2026-01-26 13:51 ` [PATCH v2 1/6] MAINTAINERS: Add missing maintainer entry for AD8366 driver Rodrigo Alencar via B4 Relay
2026-01-26 13:51 ` [PATCH v2 2/6] dt-bindings: iio: amplifiers: Add AD8366 support Rodrigo Alencar via B4 Relay
2026-01-26 20:11   ` Conor Dooley
2026-01-27 11:37     ` Rodrigo Alencar
2026-01-27 19:38       ` Conor Dooley
2026-01-28  9:39         ` Rodrigo Alencar
2026-01-28 14:43           ` Conor Dooley
2026-01-31 20:55   ` David Lechner
2026-01-26 13:51 ` [PATCH v2 3/6] iio: amplifiers: ad8366: refactor device resource management Rodrigo Alencar via B4 Relay
2026-01-27 21:12   ` Andy Shevchenko
2026-01-28  9:31     ` Rodrigo Alencar
2026-01-29 18:40       ` Jonathan Cameron [this message]
2026-01-26 13:51 ` [PATCH v2 4/6] iio: amplifiers: ad8366: add device tree support Rodrigo Alencar via B4 Relay
2026-01-27 21:21   ` Andy Shevchenko
2026-01-28  9:55     ` Rodrigo Alencar
2026-01-28 10:09       ` Andy Shevchenko
2026-01-28 10:23         ` Rodrigo Alencar
2026-01-28 12:39           ` Andy Shevchenko
2026-01-31 21:18   ` David Lechner
2026-01-26 13:51 ` [PATCH v2 5/6] iio: amplifiers: ad8366: consume enable gpio Rodrigo Alencar via B4 Relay
2026-01-31 21:19   ` David Lechner
2026-01-26 13:51 ` [PATCH v2 6/6] iio: amplifiers: ad8366: Update device support Rodrigo Alencar via B4 Relay

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=20260129184025.4abd4fe0@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=455.rodrigo.alencar@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rodrigo.alencar@analog.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