Messages in this thread | | | From | Andy Shevchenko <> | Date | Fri, 19 Aug 2022 13:36:58 +0300 | Subject | Re: [PATCH 3/4] iio: add helper function for reading channel offset in buffer |
| |
On Fri, Aug 19, 2022 at 1:33 PM Artur Rojek <contact@artur-rojek.eu> wrote: > On 2022-08-19 10:17, Andy Shevchenko wrote: > > On Wed, Aug 17, 2022 at 1:58 PM Artur Rojek <contact@artur-rojek.eu> > > wrote:
...
> >> + if (chan->scan_index < 0 || > >> + !test_bit(chan->scan_index, buffer->scan_mask)) { > >> + return -EINVAL; > >> + } > > > > Have you run checkpatch? The {} are redundant. But personally I would > > split this into two separate conditionals. > I did run checkpatch on it - all patches were ready for submission. > I don't find the {} redundant for multi-line statements, like this one,
This is a one-line conditional. So, *unlike* this one.
> and I personally prefer to check conditions that return the same error > type together.
I see that the maintainer's input is needed here, because even if the error code is the same, the semantics are different and I consider that to prevail on the combining.
-- With Best Regards, Andy Shevchenko
| |