mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Pawel Zalewski" <pzalewski@thegoodpenguin.co.uk>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	linux-input@vger.kernel.org, Danilo Krummrich <dakr@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Aleksa Savic <savicaleksa83@gmail.com>,
	linux-kernel@vger.kernel.org, Ping Cheng <ping.cheng@wacom.com>,
	Jason Gerecke <jason.gerecke@wacom.com>,
	linux-hwmon@vger.kernel.org, "Christian A. Ehrhardt" <lk@c--e.de>
Subject: Re: [PATCH v1 0/9] HID: Make driver_data in hid_device_id a union
Date: Sat, 28 Nov 2026 10:50:45 -0800	[thread overview]
Message-ID: <87ba5a17-5007-4d41-8cea-76328e789537@roeck-us.net> (raw)
In-Reply-To: <CAA6zWZLp998F363tRSwJ1VuS6djfnGqPDDWjXC3o=JvYkCuOAQ@mail.gmail.com>

Hi,

On 11/25/26 06:23, Pawel Zalewski wrote:
> For the record I did attempt this in the past [1], this approach was
> rejected and a series which changes driver_data to be always an
> integer was created instead [2]. However, I personally much prefer the
> anonymous union approach, given that it will already be the case in
> other subsystems. The HID subsystem doesn't need to go its own way and
> the alternative is slightly uglier in practice (as you end up looking
> up from tables via an index).
> 
> [1] https://lore.kernel.org/linux-input/20260518-mod-devicetable-hid_device_id-v1-0-a08e3989c283@thegoodpenguin.co.uk/
> [2] https://lore.kernel.org/linux-input/20260727-mod-devicetable-hid_device_id-v3-0-980896ca283e@thegoodpenguin.co.uk/
> 
> Reviewed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>

I don't know what happened with that series, but it does miss
at least the hwmon driver which also uses driver_data as pointer
(patch 5/9 of this series). Personally I don't really care which
approach is used, though I do content the notion that using
driver_data as pointer would be an "offender" (unless one declares
that the Linux kernel would have more than 500 such "offenders".

On as side note, unless I am missing something, it seems to me that
both series above might miss drivers/hid/hid-steelseries-arctis.c,
though possibly I misunderstand the code.

Thanks,
Guenter


  reply	other threads:[~2026-11-28 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  7:21 Uwe Kleine-König
2026-11-25  7:21 ` [PATCH v1 5/9] HID: core: " Uwe Kleine-König
2026-11-25 14:23 ` [PATCH v1 0/9] HID: " Pawel Zalewski
2026-11-28 18:50   ` Guenter Roeck [this message]
2026-11-28 22:24     ` Uwe Kleine-König

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=87ba5a17-5007-4d41-8cea-76328e789537@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bentiss@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=dakr@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=jason.gerecke@wacom.com \
    --cc=jikos@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@c--e.de \
    --cc=o-takashi@sakamocchi.jp \
    --cc=ping.cheng@wacom.com \
    --cc=pzalewski@thegoodpenguin.co.uk \
    --cc=savicaleksa83@gmail.com \
    --cc=u.kleine-koenig@baylibre.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

all inboxes | Powered by JetHome®