Re: [PATCH v4 3/6] pwm: meson: generalize 4 inputs clock on meson8 pwm type

From: Uwe Kleine-König
Date: Wed Jan 24 2024 - 04:44:32 EST


On Wed, Jan 24, 2024 at 10:11:59AM +0100, Jerome Brunet wrote:
> On Wed 24 Jan 2024 at 10:08, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > I suggest to make this
> >
> > const char *parent_names[MESON_NUM_MUX_PARENTS];
>
> Ok.
>
> >
> > to make it more explicit that really four entries are needed here. This
> > also makes is unnecessary to add the additional NULL entries to
> > pwm_gxbb_ao_parent_names and the other arrays.
>
> I would normally agree but I'd prefer to be explicit.
>
> There are some instance where the NULL is in the middle, this can't go
> away. I think it looks if some inputs are explicitly NULL while the
> other are implicit.

Adding soem NULLs explicitly is fine for me. Using an array of fixed length
still (somewhat) ensures that later no shorter arrays are added which
result in surprises.

Best reagrds
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature