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: <CAPLW+4m-GPmF6w=Dgb_WbJ0B2ynRSRRC+ijY4Zym5i5BJe4eBw@mail.gmail.com>
Date: Sun, 21 Jan 2024 20:34:14 -0600
From: Sam Protsenko <semen.protsenko@...aro.org>
To: Andi Shyti <andi.shyti@...nel.org>
Cc: Mark Brown <broonie@...nel.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Alim Akhtar <alim.akhtar@...sung.com>, 
	linux-spi@...r.kernel.org, linux-samsung-soc@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: s3c64xx: Extract FIFO depth calculation to a
 dedicated macro

On Sun, Jan 21, 2024 at 5:27 PM Andi Shyti <andi.shyti@...nel.org> wrote:
>
> Hi Sam,
>
> On Sun, Jan 21, 2024 at 04:11:21PM -0600, Sam Protsenko wrote:
> > On Sun, Jan 21, 2024 at 2:24 PM Andi Shyti <andi.shyti@...nel.org> wrote:
> > >
> > > Hi Sam,
> > >
> > > >       void __iomem *regs = sdd->regs;
> > > >       unsigned long val = 1;
> > > >       u32 status;
> > > > -
> > > > -     /* max fifo depth available */
> > > > -     u32 max_fifo = (FIFO_LVL_MASK(sdd) >> 1) + 1;
> > > > +     u32 max_fifo = FIFO_DEPTH(sdd);
> > >
> > > Why have you removed the comment? Perhaps you could place it on
> > > the side in order to remove that awful space.
> > >
> >
> > The fact that `max_fifo' contains max FIFO depth is already coded in
> > the variable name itself. And with that new FIFO_DEPTH() macro, it
> > would be basically stating the same thing the third time on the same
> > string. Thought the removal of that comment only made the code easier
> > to read. If you think I should bring the comment back, please let me
> > know and I'll send v2.
>
> No, that's fine... you have a point here :-)
>

Thanks for the review! :)

> Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ