[PATCH v3 1/4] clk: actions: Terminate clk_div_table with sentinel element
Jonathan Neuschäfer
j.neuschaefer at gmx.net
Sat Feb 5 04:58:39 PST 2022
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 at gmx.net>
> > Reviewed-by: Manivannan Sadhasivam <mani at kernel.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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220205/bdf25aa3/attachment.sig>
More information about the linux-arm-kernel
mailing list