Re: [PATCH 3/6] iio: adc: ti-adc128s052: Be consistent with arrays

From: Jonathan Cameron
Date: Mon Mar 31 2025 - 07:13:33 EST


On Mon, 31 Mar 2025 11:03:13 +0300
Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:

> The ti-adc128s052 driver has NULL terminated ID arrays for the
> of_device_id, spi_device_id and acpi_device_id. All of these are
> terminated by having an empty string as the last member of an array.
> Only the of_device_id array uses the /* sentinel */ comment.
>
> It's better to be consistent.
>
> This /* sentinel */ comment serves no real purpose these days as people
> are used to seeing these ID lists terminated with an empty array
> element.
>
> Drop the /* sentinel */ from the of_device_id.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> ---
> drivers/iio/adc/ti-adc128s052.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index d1e31122ea0d..dd1e405bf172 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -185,7 +185,7 @@ static const struct of_device_id adc128_of_match[] = {
> { .compatible = "ti,adc124s021", .data = &adc128_config[2] },
> { .compatible = "ti,adc124s051", .data = &adc128_config[2] },
> { .compatible = "ti,adc124s101", .data = &adc128_config[2] },
> - { /* sentinel */ },
> + { },

Whilst here, drop the trailing ,

More 'modern' style in kernel tends not to use them as we don't want to make it
easy to put anything after it.

If there is another such case drop the comma on that as well as part of this
patch.

I don't care that much about the /* sentinel */ though as I've let at least
one more of those in over the weekend. Still consistency is a valid argument.


> };
> MODULE_DEVICE_TABLE(of, adc128_of_match);
>