Re: [PATCH 2/4] iio: temperature: ltc2983: convert to dev_err_probe()
From: Andi Shyti
Date: Sat Apr 06 2024 - 14:39:07 EST
Hi Andy,
On Thu, Apr 04, 2024 at 03:18:05PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 04, 2024 at 01:06:24PM +0200, Nuno Sa wrote:
> > Use dev_err_probe() in the probe() path. While at it, made some simple
> > improvements:
> > * Declare a struct device *dev helper. This also makes the style more
> > consistent (some places the helper was used and not in other places);
> > * Explicitly included the err.h and errno.h headers;
> > * Removed an useless else if();
> > * Removed some unnecessary line breaks.
>
> ...
>
> > if (!(thermo->sensor_config & LTC2983_THERMOCOUPLE_DIFF_MASK) &&
> > - sensor->chan < LTC2983_DIFFERENTIAL_CHAN_MIN) {
>
> It's better if you leave {} when the body goes after a single line.
> This applies to your entire series.
I think checkpatch complains if you leave the {...} and,
honestly, I'm not a big fan of the {...}. Unless there is a last
minute rule I missed.
If checkpatch doesn't complain, I'm OK with both ways, though.
Andi