From: Waqar Hameed <waqar.hameed@axis.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>, <kernel@axis.com>,
<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 3/3] iio: Add driver for Nicera D3-323-AA PIR sensor
Date: Mon, 2 Jun 2025 17:09:59 +0200 [thread overview]
Message-ID: <pndr0026uyg.fsf@axis.com> (raw)
In-Reply-To: <20250531161029.4010a3d6@jic23-huawei> (Jonathan Cameron's message of "Sat, 31 May 2025 16:10:29 +0100")
On Sat, May 31, 2025 at 16:10 +0100 Jonathan Cameron <jic23@kernel.org> wrote:
[...]
>> I think if you use it in multiple places, it should definitively be a
>> macro definition. I just sent some patches for those that only used it
>> once (I didn't include those with `KBUILD_MODNAME`. We can discuss if we
>> should also address those in that thread).
>
> I would disagree slightly. If it is used in multiple places because there
> is some inherent reason they should have same string then I absolutely agree.
> If it's just because it's a convenient string that is used twice in places
> that could have had different string then not so much.
Absolutely! If two places can end up with different strings, then they
shouldn't share the same variable in the first place. I was not as clear
as you with my one-sentence :)
>> However, there are a bunch of drivers that _only_ use a macro definition
>> in `.name` and `indio_dev->name`, including this one. That _is_ more
>> than one place, so we should actually leave it? Or do you still think we
>> should have the same string literal in both places, as you originally
>> commented above?
>
> I'd prefer that for new code, but it is a less clear cut case than the ones
> you have tidied up, so not worth the churn of tidying up unless people
> are otherwise working on the relevant drivers.
Sure, let's use string literals in this driver then.
next prev parent reply other threads:[~2025-06-02 15:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 15:03 [PATCH 0/3] Add driver for Nicera D3-323-AA PIR sensor Waqar Hameed
2025-05-09 15:03 ` [PATCH 3/3] iio: " Waqar Hameed
2025-05-11 7:57 ` Christophe JAILLET
2025-05-16 17:16 ` Waqar Hameed
2025-05-11 12:14 ` Jonathan Cameron
2025-05-16 17:16 ` Waqar Hameed
2025-05-18 17:38 ` Jonathan Cameron
2025-05-20 11:27 ` Waqar Hameed
2025-05-25 9:30 ` Jonathan Cameron
2025-05-27 14:48 ` Waqar Hameed
2025-05-31 15:10 ` Jonathan Cameron
2025-06-02 15:09 ` Waqar Hameed [this message]
2025-06-14 22:05 ` Waqar Hameed
2025-05-09 15:03 ` [PATCH 2/3] dt-bindings: iio: proximity: Add " Waqar Hameed
2025-05-09 15:06 ` Krzysztof Kozlowski
2025-05-16 17:15 ` Waqar Hameed
2025-05-20 6:36 ` Krzysztof Kozlowski
2025-05-20 12:00 ` Waqar Hameed
2025-05-09 15:09 ` [PATCH 0/3] Add driver for " Krzysztof Kozlowski
2025-05-16 17:14 ` Waqar Hameed
-- strict thread matches above, loose matches on Subject: below --
2025-06-14 21:56 Waqar Hameed
2025-06-14 21:56 ` [PATCH 3/3] iio: " Waqar Hameed
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=pndr0026uyg.fsf@axis.com \
--to=waqar.hameed@axis.com \
--cc=jic23@kernel.org \
--cc=kernel@axis.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).