From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Kees Cook <kees@kernel.org>,
Werner Sembach <wse@tuxedocomputers.com>,
Christoffer Sandberg <cs@tuxedo.de>, feng <alec.jiang@gmail.com>,
gongqi <550230171hxy@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] Input: Drop unused assignments from pnp_device_id arrays
Date: Wed, 10 Jun 2026 13:58:17 +0200 [thread overview]
Message-ID: <ailQutR_TfyCQ-SP@monoceros> (raw)
In-Reply-To: <aij_gj5W1dylcbrX@google.com>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
Hello Dmitry,
On Tue, Jun 09, 2026 at 11:12:49PM -0700, Dmitry Torokhov wrote:
> On Tue, Jun 09, 2026 at 04:53:25PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > Explicitly assigning .driver_data in drivers that don't use this member
> > is silly and a bit irritating. Drop these. Also simplify the list
> > terminator entry to be just empty to match what most other device_id
> > tables do.
> >
> > There is no changed semantic, not even a change in the compiled result.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> > ---
> > drivers/input/gameport/ns558.c | 46 +++++++++++-----------
> > drivers/input/serio/i8042-acpipnpio.h | 56 +++++++++++++--------------
> > 2 files changed, 51 insertions(+), 51 deletions(-)
> >
> > diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c
> > index fdece6ec1df3..f70a96c4f1fd 100644
> > --- a/drivers/input/gameport/ns558.c
> > +++ b/drivers/input/gameport/ns558.c
> > @@ -148,29 +148,29 @@ static int ns558_isa_probe(int io)
> > #ifdef CONFIG_PNP
> >
> > static const struct pnp_device_id pnp_devids[] = {
> > - [...]
> > - { .id = "", },
> > + [...]
> > + { }
>
> This goes BOOOM! You have to keep empty .id string as terminator.
How so? Given that my patch doesn't modify the resulting ns558.o I doubt
that. If .id was a char *, I'd agree, but it's a char[], so there should
be no difference (and the compiler agrees).
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-06-10 11:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 14:53 [PATCH v1] Input: Drop unused assignments from pnp_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-06-10 6:12 ` Dmitry Torokhov
2026-06-10 11:58 ` Uwe Kleine-König (The Capable Hub) [this message]
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=ailQutR_TfyCQ-SP@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=550230171hxy@gmail.com \
--cc=alec.jiang@gmail.com \
--cc=cs@tuxedo.de \
--cc=dmitry.torokhov@gmail.com \
--cc=kees@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wse@tuxedocomputers.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