lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcT3ZbMyeSS6cvV5NY2YYWvDVw-MNwFEDy-S=_6sdbswA@mail.gmail.com>
Date:   Fri, 19 Aug 2022 13:36:58 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Artur Rojek <contact@...ur-rojek.eu>
Cc:     Paul Cercueil <paul@...pouillou.net>,
        Jonathan Cameron <jic23@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Chris Morgan <macromorgan@...mail.com>,
        "open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-input <linux-input@...r.kernel.org>
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@...ur-rojek.eu> wrote:
> On 2022-08-19 10:17, Andy Shevchenko wrote:
> > On Wed, Aug 17, 2022 at 1:58 PM Artur Rojek <contact@...ur-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ