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: <CAMRc=MfwR0sNGe5ER0xbSK=u_i+AFsKwb_4C7bg6jO2y0LW1NA@mail.gmail.com>
Date:   Fri, 11 Aug 2023 14:42:52 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Kent Gibson <warthog618@...il.com>, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 2/2] gpio: sim: simplify code with cleanup helpers

On Fri, Aug 11, 2023 at 11:14 AM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Thu, Aug 10, 2023 at 09:04:12PM +0200, Bartosz Golaszewski wrote:
> > On Thu, Aug 10, 2023 at 4:42 PM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
> > > On Wed, Aug 09, 2023 at 03:14:42PM +0200, Bartosz Golaszewski wrote:
>
> ...
>
> > > > +     scoped_guard(mutex, &chip->lock)
> > > > +             bitmap_replace(chip->value_map, chip->value_map, bits, mask,
> > > > +                            gc->ngpio);
> > >
> > > Perhaps with {} ?
> >
> > This scoped_guard() thing is in essence a for loop, so I believe
> > kernel coding style applies and a single statement doesn't require a
> > {}.
>
> You have two lines (or single wrapped line). I found to read it better with {}.
>

It's just a broken line, not a compound statement. Matter of personal taste. :)

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ