Re: [PATCH 2/2] gpio: sim: simplify code with cleanup helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 11, 2023 at 11:14 AM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux