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: <Yf50f7wbJi9PnUNV@latitude>
Date:   Sat, 5 Feb 2022 13:58:39 +0100
From:   Jonathan Neuschäfer <j.neuschaefer@....net>
To:     Philippe Mathieu-Daudé <f4bug@...at.org>
Cc:     Jonathan Neuschäfer <j.neuschaefer@....net>,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-mips@...r.kernel.org,
        Manivannan Sadhasivam <mani@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Andreas Färber <afaerber@...e.de>,
        Saravanan Sekar <sravanhome@...il.com>,
        Parthiban Nallathambi <pn@...x.de>,
        linux-actions@...ts.infradead.org
Subject: Re: [PATCH v3 1/4] clk: actions: Terminate clk_div_table with
 sentinel element

On Sat, Feb 05, 2022 at 01:15:46PM +0100, Philippe Mathieu-Daudé wrote:
> On 5/2/22 01:52, Jonathan Neuschäfer wrote:
> > In order that the end of a clk_div_table can be detected, it must be
> > terminated with a sentinel element (.div = 0).
> > 
> > In owl-s900.s, the { 0, 8 } element was probably meant to be just that,
> > so this patch changes { 0, 8 } to { 0, 0 }.
> > 
> > Fixes: d47317ca4ade1 ("clk: actions: Add S700 SoC clock support")
> > Fixes: d85d20053e195 ("clk: actions: Add S900 SoC clock support")
> > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@....net>
> > Reviewed-by: Manivannan Sadhasivam <mani@...nel.org>
> > ---
[...]
> >   static struct clk_div_table rmii_div_table[] = {
> >   	{0, 4},   {1, 10},
> > +	{0, 0},
> 
> Again, clearer to use:
> 
>         { /* sentinel */ }
> 
> (without the trailing comma, to enforce this is the last entry).

This style is locally consistent in the file, so anyone who reads the
file will encounter { 0, 0 } elements anyway.

So, I think it makes sense to:

- Keep this patch as is (except for the trailing comma, I'll remove that)
- Add a second patch that replaces all the sentinel elements with
  { /* sentinel */ }

This patch can go into stable branches, and the style cleanup doesn't
have to.


Best regards,
Jonathan

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ