From: Jonathan Cameron <jic23@kernel.org>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Nuno Sa <nuno.sa@analog.com>,
David Lechner <dlechner@baylibre.com>,
Javier Carrasco <javier.carrasco.cruz@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] iio: adc: ti-adc128s052: Be consistent with arrays
Date: Mon, 31 Mar 2025 12:13:15 +0100 [thread overview]
Message-ID: <20250331121315.78178349@jic23-huawei> (raw)
In-Reply-To: <49966043aabecad8db8eb81908d0d2995b0cfc38.1742474322.git.mazziesaccount@gmail.com>
On Mon, 31 Mar 2025 11:03:13 +0300
Matti Vaittinen <mazziesaccount@gmail.com> 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@gmail.com>
> ---
> 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);
>
next prev parent reply other threads:[~2025-03-31 11:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 8:01 [PATCH 0/6] Support ROHM BD79104 ADC Matti Vaittinen
2025-03-31 8:02 ` [PATCH 1/6] dt-bindings: " Matti Vaittinen
2025-03-31 15:47 ` Conor Dooley
2025-03-31 8:02 ` [PATCH 2/6] iio: adc: ti-adc128s052: Fix ADC value on BE systems Matti Vaittinen
2025-03-31 11:11 ` Jonathan Cameron
2025-03-31 12:07 ` Matti Vaittinen
2025-03-31 8:03 ` [PATCH 3/6] iio: adc: ti-adc128s052: Be consistent with arrays Matti Vaittinen
2025-03-31 11:13 ` Jonathan Cameron [this message]
2025-03-31 8:03 ` [PATCH 4/6] iio: adc: ti-adc128s052: Use devm_mutex_init() Matti Vaittinen
2025-03-31 11:13 ` Jonathan Cameron
2025-03-31 8:03 ` [PATCH 5/6] iio: adc: ti-adc128s052: Simplify using guard(mutex) Matti Vaittinen
2025-03-31 11:14 ` Jonathan Cameron
2025-03-31 8:03 ` [PATCH 6/6] iio: adc: ti-adc128s052: Support ROHM BD79104 Matti Vaittinen
2025-03-31 11:22 ` Jonathan Cameron
2025-04-01 12:33 ` Matti Vaittinen
2025-04-05 17:43 ` Jonathan Cameron
2025-04-07 6:10 ` Matti Vaittinen
2025-04-07 18:44 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250331121315.78178349@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox