From: Sudeep Holla <sudeep.holla@kernel.org>
To: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Cc: Hans de Goede <johannes.goede@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
Frank.Li@kernel.org, arm-scmi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/2] module: add SCMI device table alias support
Date: Fri, 18 Sep 2026 14:38:44 +0100 [thread overview]
Message-ID: <20260918-roaring-bee-of-acceptance-50a8a9@sudeepholla> (raw)
In-Reply-To: <3f51bf6c-5318-4e32-a1ca-3ce8cf8c4ceb@oss.qualcomm.com>
On Fri, Sep 18, 2026 at 12:13:10PM +0200, Daniel Lezcano wrote:
> On 9/18/26 12:02, Hans de Goede wrote:
> > Hi Daniel,
> >
> > On 18-Sep-26 11:53, Daniel Lezcano wrote:
> > >
> > > Hi Hans,
> > >
> > > thanks for taking care of that
> > >
> > >
> > > On 9/18/26 11:29, Hans de Goede wrote:
> > > > From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> > > >
> > > > SCMI client drivers already describe their bus match data with
> > > > MODULE_DEVICE_TABLE(scmi, ...), but modpost does not know how to consume
> > > > SCMI device tables. As a result, SCMI modules do not get generated module
> > > > aliases from their id tables.
> > > >
> > > > Move struct scmi_device_id to mod_devicetable.h so it has a fixed layout
> > > > visible to modpost, add the corresponding generated offsets and teach
> > > > file2alias to emit scmi:<protocol>:<name> aliases.
> > > >
> > > > Use the same stable alias format for SCMI device uevents and sysfs
> > > > modaliases. The previous string included the instance-specific device
> > > > name, which is not useful for matching modules.
> > > >
> > > > Assisted-by: Codex:GPT-5.5
> > > > Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> > > > Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> > > > Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> > > > Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> > > > ---
> > >
>
> [ ... ]
>
> > > > #include <linux/bitfield.h>
> > > > +#include <linux/device-id/scmi.h>
> > > > #include <linux/device.h>
> > > > #include <linux/notifier.h>
> > > > #include <linux/types.h>
> > > > @@ -951,11 +952,6 @@ struct scmi_device {
> > > > #define to_scmi_dev(d) container_of_const(d, struct scmi_device, dev)
> > > > -struct scmi_device_id {
> > > > - u8 protocol_id;
> > > > - const char *name;
> > > > -};
> > > > -
> > >
> > > What is the reason of converting the char * to a fixed array? That limits the name and may result in truncation and potentially name collision, no ?
> >
> > Because of how modpost works to generate modaliases inside the .ko
> > any string buffers in device_id structs need to have a fixed length.
> >
> > So the truncation / name collision issue pretty much applies to all
> > foo_device_id structs in the kernel. People should now to make sure
> > that any strings used will fit inside the fixed string. And I would
> > expect the compiler to warn for overly long strings.
> Ok, thanks for the clarification
Not related to above topic, but just wanted to check with Daniel if this
solves module auto-loading for you. Was there someone else who was testing
this series and was having issue with earlier versions or its you only
Hans de Goede and it was with v1/v2 when Bjorn posted them. I remember
something vaguely and couldn't trace back all the versions easily.
--
Regards,
Sudeep
next prev parent reply other threads:[~2026-09-18 13:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 9:29 [PATCH v7 0/2] firmware: arm_scmi: fix module auto-loading Hans de Goede
2026-09-18 9:29 ` [PATCH v7 1/2] module: add SCMI device table alias support Hans de Goede
2026-09-18 9:53 ` Daniel Lezcano
2026-09-18 10:02 ` Hans de Goede
2026-09-18 10:13 ` Daniel Lezcano
2026-09-18 13:38 ` Sudeep Holla [this message]
2026-09-18 14:43 ` Rob Clark
2026-09-18 14:48 ` Daniel Lezcano
2026-09-18 20:15 ` Daniel Lezcano
2026-09-18 13:32 ` Sudeep Holla
2026-09-18 14:09 ` Hans de Goede
2026-09-18 20:39 ` Uwe Kleine-König
2026-09-20 7:36 ` Sudeep Holla
2026-09-20 10:18 ` Uwe Kleine-König
2026-09-21 8:28 ` Sudeep Holla
2026-09-21 15:19 ` Uwe Kleine-König
2026-09-23 9:07 ` Sudeep Holla
2026-09-23 10:23 ` Hans de Goede
2026-09-23 10:49 ` Sudeep Holla
2026-09-23 11:26 ` Hans de Goede
2026-09-23 12:01 ` Sudeep Holla
2026-09-23 12:55 ` Uwe Kleine-König
2026-09-23 14:25 ` Sudeep Holla
2026-09-23 14:51 ` Hans de Goede
2026-09-23 15:42 ` Hans de Goede
2026-09-18 9:29 ` [PATCH v7 2/2] firmware: arm_scmi: Always create devices for standard protocols Hans de Goede
2026-09-25 9:37 ` [PATCH v7 0/2] firmware: arm_scmi: fix module auto-loading Sudeep Holla
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=20260918-roaring-bee-of-acceptance-50a8a9@sudeepholla \
--to=sudeep.holla@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=andersson@kernel.org \
--cc=arm-scmi@vger.kernel.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=cristian.marussi@arm.com \
--cc=daniel.lezcano@oss.qualcomm.com \
--cc=imx@lists.linux.dev \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@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