Thread (21 messages) 21 messages, 5 authors, 2022-08-22

Re: [PATCH 3/4] iio: add helper function for reading channel offset in buffer

From: Andy Shevchenko <hidden>
Date: 2022-08-19 10:37:40
Also in: linux-iio, linux-mips, lkml

On Fri, Aug 19, 2022 at 1:33 PM Artur Rojek [off-list ref] wrote:
On 2022-08-19 10:17, Andy Shevchenko wrote:
quoted
On Wed, Aug 17, 2022 at 1:58 PM Artur Rojek [off-list ref]
wrote:
...
quoted
quoted
+       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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help