From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Andi Shyti <andi.shyti@kernel.org>,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] mod_devicetable.h: Split into per subsystem headers
Date: Wed, 24 Jun 2026 09:42:43 -0700 [thread overview]
Message-ID: <CAHk-=wgZXrGviMxO=f-=8w1g4f4kYxPgjjRtu4rrEd=wE3WLPQ@mail.gmail.com> (raw)
In-Reply-To: <ajt3blZNDW6Zi06x@monoceros>
On Tue, 23 Jun 2026 at 23:31, Uwe Kleine-König (The Capable Hub)
<u.kleine-koenig@baylibre.com> wrote:
>
> Heads up: It's not as easy as anticipated. Two (similar) types of
> difficulties I hit are:
>
> - drivers/platform/x86/msi-ec.c doesn't include
> <linux/mod_devicetable.h> but (e.g.) <linux/acpi.h>.
So this is why I really think you need to just automate it.
Do a script that is just based around
git grep 'struct [a-z0-9_]*device_id\>'
and makes sure that the proper header exists each file.
There's a ton of those, and many of those files are
architecture-specific. And not all of them may be actually from the
old mod_devicetable.h header: some random grepping found things like
"struct gio_device_id" in the MIPS tree which is something else
entirely.
So the script probably needs to be fairly flexible, but I really think
there should be some automated part here, because there's just a *lot*
of possible cases:
$ git grep -l 'struct [a-z0-9_]*device_id\>' | wc -l
9496
(although in fairness, about 6k of those files are from just
"of_device_id", so handling just a few handful of the most common
cases probably will take care of 90% of it).
> - <linux/of_platform.h> makes use of resource_size_t. That was defined
> before via <linux/mod_devicetable.h> -> <linux/types.h>, but
> <linux/mod_device_id/of.h> doesn't include <linux/types.h>. Just
> adding that to be sure not to introduce build regessions is sad.
This kind of issue is probably inevitable. *Some* "find problems by
build errors" will happen when it's this massive a re-org. I think
that pain is worth it, as long as some basic automation means that all
the normal cases are handled.
Linus
prev parent reply other threads:[~2026-06-24 16:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 21:07 Uwe Kleine-König (The Capable Hub)
2026-06-22 21:49 ` Linus Torvalds
2026-06-23 5:24 ` Greg Kroah-Hartman
2026-06-23 6:40 ` for next: ukleinek/linux.git:device-id-rework [Was: Re: [PATCH] mod_devicetable.h: Split into per subsystem headers] Uwe Kleine-König (The Capable Hub)
2026-06-23 11:12 ` Mark Brown
2026-06-22 22:06 ` [PATCH] mod_devicetable.h: Split into per subsystem headers Linus Torvalds
2026-06-23 14:47 ` Uwe Kleine-König (The Capable Hub)
2026-06-23 14:54 ` Linus Torvalds
2026-06-23 16:13 ` Uwe Kleine-König (The Capable Hub)
2026-06-24 6:31 ` Uwe Kleine-König (The Capable Hub)
2026-06-24 16:42 ` Linus Torvalds [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='CAHk-=wgZXrGviMxO=f-=8w1g4f4kYxPgjjRtu4rrEd=wE3WLPQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=andi.shyti@kernel.org \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
--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