Re: [PATCH] iio: magnetometer: ak8975: remove unnecessary braces

From: Jonathan Cameron

Date: Sun Apr 19 2026 - 12:21:05 EST


On Fri, 17 Apr 2026 21:30:14 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Fri, Apr 17, 2026 at 01:02:24PM +0000, Joshua Crofts wrote:
> > Remove unnecessary braces at single if statement block.
> >
> > No functional change.
>
> Code wise is good, but I think it's an unneeded churn as a standalone change.
> Up to Jonathan.
Whilst it's churn it's very localized and unlikely to cause us much trouble
so I've taken it.

Other comments below make sense for follow up patches.

thanks,

Jonathan

>
> ...
>
> > ret = i2c_smbus_write_byte_data(data->client,
> > data->def->ctrl_regs[CNTL], regval);
> > - if (ret < 0) {
> > + if (ret < 0)
> > return ret;
> > - }
> > +
> > data->cntl_cache = regval;
> > /* After mode change wait atleast 100us */
>
> Side note: you can also fix a typo (missing space) and
>
> > usleep_range(100, 500);
>
> move the driver to use fsleep().
>
> (In a separate change.)
>