From: Jonathan Cameron <jic23@kernel.org>
To: David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org>
Cc: david@ixit.cz, Lars-Peter Clausen <lars@metafoo.de>,
Svyatoslav Ryhel <clamor95@gmail.com>,
Robert Eckelmann <longnoserob@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] iio: light: al3000a: Use DRV_NAME
Date: Sun, 9 Mar 2025 16:33:22 +0000 [thread overview]
Message-ID: <20250309163322.331b6a36@jic23-huawei> (raw)
In-Reply-To: <20250308-al3010-iio-regmap-v1-2-b672535e8213@ixit.cz>
On Sat, 08 Mar 2025 21:00:59 +0100
David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org> wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Sync syntax with other similar drivers.
Sorry no. This is a syntax I am against and frequently request people to not
use in drivers.
The main reason is there is no explicit reason the two locations you use it
in here should use the same string. Using a define makes that implication
and I'd prefer that we did not. Note that if they were required to be the
same then a define would make sense.
I want to look at the code and see the string directly in these locations
rather than go look for a define that adds nothing.
Jonathan
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> drivers/iio/light/al3000a.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/al3000a.c b/drivers/iio/light/al3000a.c
> index e2fbb1270040f43d9f0a97838861818a8eaef813..e1fa4543f336cec61140b5c44d3794df1fa485cd 100644
> --- a/drivers/iio/light/al3000a.c
> +++ b/drivers/iio/light/al3000a.c
> @@ -13,6 +13,8 @@
>
> #include <linux/iio/iio.h>
>
> +#define AL3000A_DRV_NAME "al3000a"
> +
> #define AL3000A_REG_SYSTEM 0x00
> #define AL3000A_REG_DATA 0x05
>
> @@ -148,7 +150,7 @@ static int al3000a_probe(struct i2c_client *client)
> "failed to get vdd regulator\n");
>
> indio_dev->info = &al3000a_info;
> - indio_dev->name = "al3000a";
> + indio_dev->name = AL3000A_DRV_NAME;
> indio_dev->channels = al3000a_channels;
> indio_dev->num_channels = ARRAY_SIZE(al3000a_channels);
> indio_dev->modes = INDIO_DIRECT_MODE;
> @@ -195,7 +197,7 @@ MODULE_DEVICE_TABLE(of, al3000a_of_match);
>
> static struct i2c_driver al3000a_driver = {
> .driver = {
> - .name = "al3000a",
> + .name = AL3000A_DRV_NAME,
> .of_match_table = al3000a_of_match,
> .pm = pm_sleep_ptr(&al3000a_pm_ops),
> },
>
next prev parent reply other threads:[~2025-03-09 16:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 20:00 [PATCH 0/4] iio: light: Modernize al3010 and al3320a codebase David Heidelberg via B4 Relay
2025-03-08 20:00 ` [PATCH 1/4] iio: light: al3320a: Drop deprecated email for Daniel David Heidelberg via B4 Relay
2025-03-09 16:30 ` Jonathan Cameron
2025-03-08 20:00 ` [PATCH 2/4] iio: light: al3000a: Use DRV_NAME David Heidelberg via B4 Relay
2025-03-09 16:33 ` Jonathan Cameron [this message]
2025-03-08 20:01 ` [PATCH 3/4] iio: light: al3010: Implement regmap support David Heidelberg via B4 Relay
2025-03-09 16:45 ` Jonathan Cameron
2025-03-09 21:11 ` David Heidelberg
2025-03-10 20:00 ` Jonathan Cameron
2025-03-08 20:01 ` [PATCH 4/4] iio: light: al3320a: " David Heidelberg via B4 Relay
2025-03-09 16:47 ` 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=20250309163322.331b6a36@jic23-huawei \
--to=jic23@kernel.org \
--cc=clamor95@gmail.com \
--cc=david@ixit.cz \
--cc=devnull+david.ixit.cz@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longnoserob@gmail.com \
/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