Re: [PATCH v3 05/10] iio: accel: mma8452: Use dev_err_probe()
From: Andy Shevchenko
Date: Wed May 06 2026 - 05:42:16 EST
On Wed, May 06, 2026 at 11:27:12AM +0200, Joshua Crofts wrote:
> On Wed, 6 May 2026 at 11:22, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
> > On Tue, May 05, 2026 at 08:45:32PM +0200, Joshua Crofts wrote:
> > > On Tue, 5 May 2026 at 19:49, Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> wrote:
...
> > > > static int mma8452_probe(struct i2c_client *client)
> > > > {
> > > > + struct device *dev = &client->dev;
> > >
> > > Stray change, I assume this belongs to patch 7 ("use local struct device") of
> > > your series.
> >
> > Not really. It switches to dev_err_probe() that uses it.
>
> Perhaps I used stray change incorrectly. The series has a patch that
> adds instances of struct device, so I'm not sure why this patch is adding
> it as well.
Because it makes sense here. OTOH, we only change a couple of lines, worth
it having the temporary variable or not is a good question.
> It took me a solid minute to realize what happened when reviewing
> patch 7 of the series, I was ready to say it wouldn't compile (see my
> comment in patch 7).
Yep, but it's okay for patches that have dependencies. These two doesn't seem
like backporting material, they are in the bucket of "cleaning up the things",
which may have dependencies and it's fine.
--
With Best Regards,
Andy Shevchenko