Re: [PATCH 3/3 v3] spi: s3c64xx: Convert to use GPIO descriptors

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

 



On Fri, Jan 21, 2022 at 1:52 PM Sam Protsenko
<semen.protsenko@xxxxxxxxxx> wrote:
> On Wed, 19 Jan 2022 at 01:11, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> >
> > Convert the S3C64xx SPI host to use GPIO descriptors.
> >
> > Provide GPIO descriptor tables for the one user with CS
> > 0 and 1.

...

> >         /* Configure feedback delay */
> > -       writel(cs->fb_delay & 0x3, sdd->regs + S3C64XX_SPI_FB_CLK);
> > +       if (!cs)
> > +               /* No delay if not defined */
> > +               writel(0, sdd->regs + S3C64XX_SPI_FB_CLK);
> > +       else
> > +               writel(cs->fb_delay & 0x3, sdd->regs + S3C64XX_SPI_FB_CLK);
>
> Looks good to me. I'd add {} braces and change "if (!cs)" to "if
> (cs)", but that's hair splitting and not worth v4, it's fine as it is.

If you are going to change code, then why not use positive conditions?

  if (cs)
    ...
  else {
    ...
  }

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux