Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.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: Tue, 9 Jun 2026 23:12:49 -0700	[thread overview]
Message-ID: <aij_gj5W1dylcbrX@google.com> (raw)
In-Reply-To: <f987c14dea1d3236d3889e5cf96c01eef6a2445d.1781016727.git.u.kleine-koenig@baylibre.com>

Hi Uwe,

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 = "@P@0001", .driver_data = 0 }, /* ALS 100 */
> -	{ .id = "@P@0020", .driver_data = 0 }, /* ALS 200 */
> -	{ .id = "@P@1001", .driver_data = 0 }, /* ALS 100+ */
> -	{ .id = "@P@2001", .driver_data = 0 }, /* ALS 120 */
> -	{ .id = "ASB16fd", .driver_data = 0 }, /* AdLib NSC16 */
> -	{ .id = "AZT3001", .driver_data = 0 }, /* AZT1008 */
> -	{ .id = "CDC0001", .driver_data = 0 }, /* Opl3-SAx */
> -	{ .id = "CSC0001", .driver_data = 0 }, /* CS4232 */
> -	{ .id = "CSC000f", .driver_data = 0 }, /* CS4236 */
> -	{ .id = "CSC0101", .driver_data = 0 }, /* CS4327 */
> -	{ .id = "CTL7001", .driver_data = 0 }, /* SB16 */
> -	{ .id = "CTL7002", .driver_data = 0 }, /* AWE64 */
> -	{ .id = "CTL7005", .driver_data = 0 }, /* Vibra16 */
> -	{ .id = "ENS2020", .driver_data = 0 }, /* SoundscapeVIVO */
> -	{ .id = "ESS0001", .driver_data = 0 }, /* ES1869 */
> -	{ .id = "ESS0005", .driver_data = 0 }, /* ES1878 */
> -	{ .id = "ESS6880", .driver_data = 0 }, /* ES688 */
> -	{ .id = "IBM0012", .driver_data = 0 }, /* CS4232 */
> -	{ .id = "OPT0001", .driver_data = 0 }, /* OPTi Audio16 */
> -	{ .id = "YMH0006", .driver_data = 0 }, /* Opl3-SA */
> -	{ .id = "YMH0022", .driver_data = 0 }, /* Opl3-SAx */
> -	{ .id = "PNPb02f", .driver_data = 0 }, /* Generic */
> -	{ .id = "", },
> +	{ .id = "@P@0001" }, /* ALS 100 */
> +	{ .id = "@P@0020" }, /* ALS 200 */
> +	{ .id = "@P@1001" }, /* ALS 100+ */
> +	{ .id = "@P@2001" }, /* ALS 120 */
> +	{ .id = "ASB16fd" }, /* AdLib NSC16 */
> +	{ .id = "AZT3001" }, /* AZT1008 */
> +	{ .id = "CDC0001" }, /* Opl3-SAx */
> +	{ .id = "CSC0001" }, /* CS4232 */
> +	{ .id = "CSC000f" }, /* CS4236 */
> +	{ .id = "CSC0101" }, /* CS4327 */
> +	{ .id = "CTL7001" }, /* SB16 */
> +	{ .id = "CTL7002" }, /* AWE64 */
> +	{ .id = "CTL7005" }, /* Vibra16 */
> +	{ .id = "ENS2020" }, /* SoundscapeVIVO */
> +	{ .id = "ESS0001" }, /* ES1869 */
> +	{ .id = "ESS0005" }, /* ES1878 */
> +	{ .id = "ESS6880" }, /* ES688 */
> +	{ .id = "IBM0012" }, /* CS4232 */
> +	{ .id = "OPT0001" }, /* OPTi Audio16 */
> +	{ .id = "YMH0006" }, /* Opl3-SA */
> +	{ .id = "YMH0022" }, /* Opl3-SAx */
> +	{ .id = "PNPb02f" }, /* Generic */
> +	{ }

This goes BOOOM! You have to keep empty .id string as terminator.

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-06-10  6:12 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 [this message]
2026-06-10 11:58   ` Uwe Kleine-König (The Capable Hub)

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=aij_gj5W1dylcbrX@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=550230171hxy@gmail.com \
    --cc=alec.jiang@gmail.com \
    --cc=cs@tuxedo.de \
    --cc=kees@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --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