From: Vladimir Oltean <olteanv@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 1/1] net: dsa: sja1105: silent spi_device_id warnings
Date: Thu, 30 Jun 2022 19:10:59 +0300 [thread overview]
Message-ID: <20220630161059.jnmladythszbh7py@skbuf> (raw)
In-Reply-To: <20220630071013.1710594-1-o.rempel@pengutronix.de>
On Thu, Jun 30, 2022 at 09:10:13AM +0200, Oleksij Rempel wrote:
> Add spi_device_id entries to silent following warnings:
> SPI driver sja1105 has no spi_device_id for nxp,sja1105e
> SPI driver sja1105 has no spi_device_id for nxp,sja1105t
> SPI driver sja1105 has no spi_device_id for nxp,sja1105p
> SPI driver sja1105 has no spi_device_id for nxp,sja1105q
> SPI driver sja1105 has no spi_device_id for nxp,sja1105r
> SPI driver sja1105 has no spi_device_id for nxp,sja1105s
> SPI driver sja1105 has no spi_device_id for nxp,sja1110a
> SPI driver sja1105 has no spi_device_id for nxp,sja1110b
> SPI driver sja1105 has no spi_device_id for nxp,sja1110c
> SPI driver sja1105 has no spi_device_id for nxp,sja1110d
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/dsa/sja1105/sja1105_main.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
> index b253e27bcfb4..b03d0d0c3dbf 100644
> --- a/drivers/net/dsa/sja1105/sja1105_main.c
> +++ b/drivers/net/dsa/sja1105/sja1105_main.c
> @@ -3382,12 +3382,28 @@ static const struct of_device_id sja1105_dt_ids[] = {
> };
> MODULE_DEVICE_TABLE(of, sja1105_dt_ids);
>
> +static const struct spi_device_id sja1105_spi_ids[] = {
> + { "sja1105e" },
> + { "sja1105t" },
> + { "sja1105p" },
> + { "sja1105q" },
> + { "sja1105r" },
> + { "sja1105s" },
> + { "sja1110a" },
> + { "sja1110b" },
> + { "sja1110c" },
> + { "sja1110d" },
> + { },
> +};
> +MODULE_DEVICE_TABLE(spi, sja1105_spi_ids);
> +
> static struct spi_driver sja1105_driver = {
> .driver = {
> .name = "sja1105",
> .owner = THIS_MODULE,
> .of_match_table = of_match_ptr(sja1105_dt_ids),
> },
> + .id_table = sja1105_spi_ids,
> .probe = sja1105_probe,
> .remove = sja1105_remove,
> .shutdown = sja1105_shutdown,
> --
> 2.30.2
>
Do we also need these?
MODULE_ALIAS("spi:sja1105e");
MODULE_ALIAS("spi:sja1105t");
MODULE_ALIAS("spi:sja1105p");
MODULE_ALIAS("spi:sja1105q");
MODULE_ALIAS("spi:sja1105r");
MODULE_ALIAS("spi:sja1105s");
MODULE_ALIAS("spi:sja1110a");
MODULE_ALIAS("spi:sja1110b");
MODULE_ALIAS("spi:sja1110c");
MODULE_ALIAS("spi:sja1110d");
To be honest I don't do much testing with modules at all, so I'm not
sure if udev-based module loading is broken or not. I remember becoming
vaguely curious after commit 5fa6863ba692 ("spi: Check we have a
spi_device_id for each DT compatible"), and I did some basic testing
without the spi_device_id table and MODULE_ALIASes, and it appeared that
udev could still autoload the sja1105 kernel module just fine.
So I'm not really sure what's broken.
next prev parent reply other threads:[~2022-06-30 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 7:10 [PATCH net-next v1 1/1] net: dsa: sja1105: silent spi_device_id warnings Oleksij Rempel
2022-06-30 16:10 ` Vladimir Oltean [this message]
2022-07-01 7:18 ` Oleksij Rempel
2022-07-01 10:20 ` Vladimir Oltean
2022-07-01 11:04 ` Oleksij Rempel
2022-07-01 17:17 ` Vladimir Oltean
2022-07-01 17:33 ` Florian Fainelli
2022-07-06 14:43 ` Vladimir Oltean
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=20220630161059.jnmladythszbh7py@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.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