[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aAPNWxyCI2kw1LhY@smile.fi.intel.com>
Date: Sat, 19 Apr 2025 19:20:43 +0300
From: Andy Shevchenko <andy@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: amplifiers: ada4250: clean up ada4250_init()
On Fri, Apr 18, 2025 at 03:37:54PM -0500, David Lechner wrote:
> There are a few opportunities to simplify the code in ada4250_init():
> * Replace local spi variable with dev since spi is not used directly.
> * Drop the data variable and use chip_id directly with the regmap bulk
> read (__aligned() and initialization of the data variable were
> unnecessary).
> * Don't use get_unaligned_le16() when not needed.
> * Use dev_err_probe() instead of dev_err() and return.
Sorry, but while a good one, this needs a split, at least to three:
1) __le16 type and linked changes;
2) dev_err_probe();
3) the rest...
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists