net: dsa: lantiq_gswip: mark OF related data as maybe unused
Subsystems (11)
PATCH 1/12 net: dsa: lantiq_gswip: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/dsa/lantiq_gswip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/lantiq_gswip.c +1 -1
@@ -1885,7 +1885,7 @@ static const struct xway_gphy_match_data xrx300_gphy_data = { .ge_firmware_name = "lantiq/xrx300_phy11g_a21.bin", }; -static const struct of_device_id xway_gphy_match[] = { +static const struct of_device_id xway_gphy_match[]__maybe_unused = { { .compatible ="lantiq,xrx200-gphy-fw" , .data =NULL }, { .compatible ="lantiq,xrx200a1x-gphy-fw" , .data = &xrx200a1x_gphy_data }, { .compatible ="lantiq,xrx200a2x-gphy-fw" , .data = &xrx200a2x_gphy_data },
Signature · 1 line
2.34.1
PATCH 2/12 net: dsa: lan9303: drop of_match_ptr for ID table
The driver will match mostly or only by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/dsa/lan9303_i2c.c:97:34: error: ‘lan9303_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] drivers/net/dsa/lan9303_mdio.c:157:34: error: ‘lan9303_mdio_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/lan9303_i2c.c +1 -1
@@ -103,7 +103,7 @@ MODULE_DEVICE_TABLE(of, lan9303_i2c_of_match);static struct i2c_driver lan9303_i2c_driver = { .driver = { .name ="LAN9303_I2C" , - .of_match_table =of_match_ptr (lan9303_i2c_of_match), + .of_match_table = lan9303_i2c_of_match, }, .probe_new = lan9303_i2c_probe, .remove = lan9303_i2c_remove,
drivers/net/dsa/lan9303_mdio.c +1 -1
@@ -164,7 +164,7 @@ MODULE_DEVICE_TABLE(of, lan9303_mdio_of_match);static struct mdio_driver lan9303_mdio_driver = { .mdiodrv.driver = { .name ="LAN9303_MDIO" , - .of_match_table =of_match_ptr (lan9303_mdio_of_match), + .of_match_table = lan9303_mdio_of_match, }, .probe = lan9303_mdio_probe, .remove = lan9303_mdio_remove,
Signature · 1 line
2.34.1
PATCH 3/12 net: dsa: seville_vsc9953: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/dsa/ocelot/seville_vsc9953.c:1070:34: error: ‘seville_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/dsa/ocelot/seville_vsc9953.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/ocelot/seville_vsc9953.c +1 -1
@@ -1079,7 +1079,7 @@ static struct platform_driver seville_vsc9953_driver = { .shutdown = seville_shutdown, .driver = { .name = "mscc_seville", - .of_match_table = of_match_ptr(seville_of_match), + .of_match_table = seville_of_match, }, };module_platform_driver (seville_vsc9953_driver);
Signature · 1 line
2.34.1
PATCH 4/12 net: dsa: ksz9477: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/dsa/microchip/ksz9477_i2c.c:84:34: error: ‘ksz9477_dt_ids’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/dsa/microchip/ksz9477_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/microchip/ksz9477_i2c.c +1 -1
@@ -117,7 +117,7 @@ MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);static struct i2c_driver ksz9477_i2c_driver = { .driver = { .name ="ksz9477-switch" , - .of_match_table =of_match_ptr (ksz9477_dt_ids), + .of_match_table = ksz9477_dt_ids, }, .probe_new = ksz9477_i2c_probe, .remove = ksz9477_i2c_remove,
Signature · 1 line
2.34.1
PATCH 5/12 net: dsa: ocelot: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/dsa/ocelot/ocelot_ext.c:143:34: error: ‘ocelot_ext_switch_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/dsa/ocelot/ocelot_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/ocelot/ocelot_ext.c +1 -1
@@ -149,7 +149,7 @@ MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match);static struct platform_driver ocelot_ext_switch_driver = { .driver = { .name ="ocelot-ext-switch" , - .of_match_table =of_match_ptr (ocelot_ext_switch_of_match), + .of_match_table = ocelot_ext_switch_of_match, }, .probe = ocelot_ext_probe, .remove = ocelot_ext_remove,
Signature · 1 line
2.34.1
Re: [PATCH 05/12] net: dsa: ocelot: drop of_match_ptr for ID table
Quoted 27 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/dsa/ocelot/ocelot_ext.c:143:34: error: ‘ocelot_ext_switch_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/net/dsa/ocelot/ocelot_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/dsa/ocelot/ocelot_ext.c +1
-1@@ -149,7 +149,7 @@ MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match);static struct platform_driver ocelot_ext_switch_driver = { .driver = { .name ="ocelot-ext-switch" , - .of_match_table =of_match_ptr (ocelot_ext_switch_of_match), + .of_match_table = ocelot_ext_switch_of_match, }, .probe = ocelot_ext_probe, .remove = ocelot_ext_remove,Signature · 1 line
2.34.1
PATCH 6/12 net: phy: ks8995: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/phy/spi_ks8995.c:156:34: error: ‘ks8895_spi_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/phy/spi_ks8995.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/spi_ks8995.c +1 -1
@@ -491,7 +491,7 @@ static void ks8995_remove(struct spi_device *spi)static struct spi_driver ks8995_driver = { .driver = { .name ="spi-ks8995" , - .of_match_table =of_match_ptr (ks8895_spi_of_match), + .of_match_table = ks8895_spi_of_match, }, .probe = ks8995_probe, .remove = ks8995_remove,
Signature · 1 line
2.34.1
PATCH 7/12 net: ieee802154: adf7242: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/adf7242.c:1322:34: error: ‘adf7242_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/ieee802154/adf7242.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/adf7242.c +1 -1
@@ -1336,7 +1336,7 @@ MODULE_DEVICE_TABLE(spi, adf7242_device_id);static struct spi_driver adf7242_driver = { .id_table = adf7242_device_id, .driver = { - .of_match_table =of_match_ptr (adf7242_of_match), + .of_match_table = adf7242_of_match, .name ="adf7242" , .owner =THIS_MODULE , },
Signature · 1 line
2.34.1
RE: [PATCH 07/12] net: ieee802154: adf7242: drop of_match_ptr for ID table
Quoted 23 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Samstag, 11. März 2023 18:33
To: Andrew Lunn <[email protected]>; Florian Fainelli <[email protected]>; Vladimir Oltean <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Hauke Mehrtens <[email protected]>; Woojung Huh <[email protected]>; [email protected]; Claudiu Manoil <[email protected]>; Alexandre Belloni <[email protected]>; Colin Foster <colin.foster@in- advantage.com>; Hennerich, Michael <[email protected]>; Alexander Aring <[email protected]>; Stefan Schmidt <[email protected]>; Miquel Raynal <[email protected]>; Heiner Kallweit <[email protected]>; Russell King <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Cc: Krzysztof Kozlowski <[email protected]>
Subject: [PATCH 07/12] net: ieee802154: adf7242: dropof_match_ptrfor ID table
Quoted 8 lines
The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in
of_match_ptr(this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/adf7242.c:1322:34: error: ‘adf7242_of_match’
defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 20 lines
--- drivers/net/ieee802154/adf7242.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ieee802154/adf7242.c +1
-2@@ -1336,7 +1336,7 @@ MODULE_DEVICE_TABLE(spi, adf7242_device_id);static struct spi_driver adf7242_driver = { .id_table = adf7242_device_id, .driver = { - .of_match_table =of_match_ptr (adf7242_of_match), + .of_match_table = adf7242_of_match, .name ="adf7242" , .owner =THIS_MODULE , }, --2.34.1
Re: [PATCH 07/12] net: ieee802154: adf7242: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiHi Krzysztof,
[email protected] wrote on Sat, 11 Mar 2023 18:32:58 +0100:
Quoted 7 lines
The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in
of_match_ptr(this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/adf7242.c:1322:34: error: ‘adf7242_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>
I see Stefan already acked most of the ieee802154 patches, but I didn't got notified for this one, so in case:
Quoted 9 lines
--- drivers/net/ieee802154/adf7242.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ieee802154/adf7242.c +0
-0
drivers/net/ieee802154/adf7242.c MODULE_DEVICE_TABLE(spi, adf7242_device_id); · line 1342
Quoted 8 lines
drivers/net/ieee802154/adf7242.c +1
-1@@ -1336,7 +1336,7 @@ MODULE_DEVICE_TABLE(spi, adf7242_device_id);static struct spi_driver adf7242_driver = { .id_table = adf7242_device_id, .driver = { - .of_match_table =of_match_ptr (adf7242_of_match), + .of_match_table = adf7242_of_match, .name ="adf7242" , .owner =THIS_MODULE , },
Thanks,
Miquèl
Stefan Schmidt
maintainerRe: [PATCH 07/12] net: ieee802154: adf7242: drop of_match_ptr for ID table
Hello.
Quoted 8 lines · Miquel Raynal
Hi Krzysztof,
[email protected] wrote on Sat, 11 Mar 2023 18:32:58 +0100:
Quoted 4 lines
The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in
of_match_ptr(this also allows ACPI matching via PRP0001, even though it might not be relevant here).
Quoted 6 lines
Quoted 3 lines
drivers/net/ieee802154/adf7242.c:1322:34: error: ‘adf7242_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>I see Stefan already acked most of the ieee802154 patches, but I didn't got notified for this one, so in case:
The reason I did not ack the two patches for adf7242 is that Michael as driver maintainer ack'ed them already.
I only handled the ones where we have no active maintainer, as a fallback.
regards
Stefan Schmidt
PATCH 8/12 net: ieee802154: mcr20a: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/mcr20a.c:1340:34: error: ‘mcr20a_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/ieee802154/mcr20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/mcr20a.c +1 -1
@@ -1352,7 +1352,7 @@ MODULE_DEVICE_TABLE(spi, mcr20a_device_id);static struct spi_driver mcr20a_driver = { .id_table = mcr20a_device_id, .driver = { - .of_match_table =of_match_ptr (mcr20a_of_match), + .of_match_table = mcr20a_of_match, .name ="mcr20a" , }, .probe = mcr20a_probe,
Signature · 1 line
2.34.1
Re: [PATCH 08/12] net: ieee802154: mcr20a: drop of_match_ptr for ID table
Hello
Quoted 16 lines · Krzysztof Kozlowski
The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in
of_match_ptr(this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/mcr20a.c:1340:34: error: ‘mcr20a_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/net/ieee802154/mcr20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ieee802154/mcr20a.c +0
-0
drivers/net/ieee802154/mcr20a.c MODULE_DEVICE_TABLE(spi, mcr20a_device_id); · line 1358
Quoted 8 lines
drivers/net/ieee802154/mcr20a.c +1
-1@@ -1352,7 +1352,7 @@ MODULE_DEVICE_TABLE(spi, mcr20a_device_id);static struct spi_driver mcr20a_driver = { .id_table = mcr20a_device_id, .driver = { - .of_match_table =of_match_ptr (mcr20a_of_match), + .of_match_table = mcr20a_of_match, .name ="mcr20a" , }, .probe = mcr20a_probe,
regards
Stefan Schmidt
PATCH 9/12 net: ieee802154: at86rf230: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/at86rf230.c:1644:34: error: ‘at86rf230_of_match’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/at86rf230.c +1 -1
@@ -1662,7 +1662,7 @@ MODULE_DEVICE_TABLE(spi, at86rf230_device_id);static struct spi_driver at86rf230_driver = { .id_table = at86rf230_device_id, .driver = { - .of_match_table =of_match_ptr (at86rf230_of_match), + .of_match_table = at86rf230_of_match, .name ="at86rf230" , }, .probe = at86rf230_probe,
Signature · 1 line
2.34.1
Re: [PATCH 09/12] net: ieee802154: at86rf230: drop of_match_ptr for ID table
Hello.
Quoted 16 lines · Krzysztof Kozlowski
The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in
of_match_ptr(this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/at86rf230.c:1644:34: error: ‘at86rf230_of_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/net/ieee802154/at86rf230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ieee802154/at86rf230.c +0
-0
drivers/net/ieee802154/at86rf230.c MODULE_DEVICE_TABLE(spi, at86rf230_device_id); · line 1668
Quoted 8 lines
drivers/net/ieee802154/at86rf230.c +1
-1@@ -1662,7 +1662,7 @@ MODULE_DEVICE_TABLE(spi, at86rf230_device_id);static struct spi_driver at86rf230_driver = { .id_table = at86rf230_device_id, .driver = { - .of_match_table =of_match_ptr (at86rf230_of_match), + .of_match_table = at86rf230_of_match, .name ="at86rf230" , }, .probe = at86rf230_probe,
regards
Stefan Schmidt
PATCH 10/12 net: ieee802154: ca8210: drop of_match_ptr for ID table
In reply to Krzysztof KozlowskiThe driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/ca8210.c:3174:34: error: ‘ca8210_of_ids’ defined but not used [-Werror=unused-const-variable=]
--- drivers/net/ieee802154/ca8210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ieee802154/ca8210.c +1 -1
@@ -3181,7 +3181,7 @@ static struct spi_driver ca8210_spi_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(ca8210_of_ids), + .of_match_table = ca8210_of_ids, }, .probe = ca8210_probe, .remove = ca8210_remove
Signature · 1 line
2.34.1
Re: [PATCH 10/12] net: ieee802154: ca8210: drop of_match_ptr for ID table
Hello.
Quoted 16 lines · Krzysztof Kozlowski
The driver can match only via the DT table so the table should be always used and the
of_match_ptrdoes not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here).
drivers/net/ieee802154/ca8210.c:3174:34: error: ‘ca8210_of_ids’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/net/ieee802154/ca8210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ieee802154/ca8210.c +0
-0
drivers/net/ieee802154/ca8210.c static struct spi_driver ca8210_spi_driver = { · line 3187
Quoted 8 lines
drivers/net/ieee802154/ca8210.c +1
-1@@ -3181,7 +3181,7 @@ static struct spi_driver ca8210_spi_driver = { .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, - .of_match_table = of_match_ptr(ca8210_of_ids), + .of_match_table = ca8210_of_ids, }, .probe = ca8210_probe, .remove = ca8210_remove
regards
Stefan Schmidt
PATCH 11/12 net: ieee802154: adf7242: drop owner from driver
In reply to Krzysztof KozlowskiCore already sets owner in spi_driver.
--- drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ieee802154/adf7242.c +0 -1
@@ -1338,7 +1338,6 @@ static struct spi_driver adf7242_driver = { .driver = { .of_match_table = adf7242_of_match, .name ="adf7242" , - .owner =THIS_MODULE , }, .probe = adf7242_probe, .remove = adf7242_remove,
Signature · 1 line
2.34.1
RE: [PATCH 11/12] net: ieee802154: adf7242: drop owner from driver
Quoted 22 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Samstag, 11. März 2023 18:33
To: Andrew Lunn <[email protected]>; Florian Fainelli <[email protected]>; Vladimir Oltean <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Hauke Mehrtens <[email protected]>; Woojung Huh <[email protected]>; [email protected]; Claudiu Manoil <[email protected]>; Alexandre Belloni <[email protected]>; Colin Foster <colin.foster@in- advantage.com>; Hennerich, Michael <[email protected]>; Alexander Aring <[email protected]>; Stefan Schmidt <[email protected]>; Miquel Raynal <[email protected]>; Heiner Kallweit <[email protected]>; Russell King <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Cc: Krzysztof Kozlowski <[email protected]>
Subject: [PATCH 11/12] net: ieee802154: adf7242: drop owner from driver
Quoted 3 lines
Core already sets owner in
spi_driver.Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 19 lines
--- drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ieee802154/adf7242.c +0
-2@@ -1338,7 +1338,6 @@ static struct spi_driver adf7242_driver = { .driver = { .of_match_table = adf7242_of_match, .name ="adf7242" , - .owner =THIS_MODULE , }, .probe = adf7242_probe, .remove = adf7242_remove, --2.34.1
Re: [PATCH 11/12] net: ieee802154: adf7242: drop owner from driver
In reply to Krzysztof KozlowskiHi Krzysztof,
[email protected] wrote on Sat, 11 Mar 2023 18:33:02 +0100:
Quoted 3 lines
Core already sets owner in
spi_driver.Signed-off-by Krzysztof Kozlowski <[email protected]>
Same here:
Quoted 9 lines
--- drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ieee802154/adf7242.c +0
-0
drivers/net/ieee802154/adf7242.c static struct spi_driver adf7242_driver = { · line 1343
Quoted 7 lines
drivers/net/ieee802154/adf7242.c +0
-1@@ -1338,7 +1338,6 @@ static struct spi_driver adf7242_driver = { .driver = { .of_match_table = adf7242_of_match, .name ="adf7242" , - .owner =THIS_MODULE , }, .probe = adf7242_probe, .remove = adf7242_remove,
Thanks,
Miquèl
PATCH 12/12 net: ieee802154: ca8210: drop owner from driver
In reply to Krzysztof KozlowskiCore already sets owner in spi_driver.
--- drivers/net/ieee802154/ca8210.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ieee802154/ca8210.c +0 -1
@@ -3180,7 +3180,6 @@ MODULE_DEVICE_TABLE(of, ca8210_of_ids);static struct spi_driver ca8210_spi_driver = { .driver = { .name =DRIVER_NAME , - .owner =THIS_MODULE , .of_match_table = ca8210_of_ids, }, .probe = ca8210_probe,
Signature · 1 line
2.34.1
Re: [PATCH 12/12] net: ieee802154: ca8210: drop owner from driver
Hello.
Quoted 12 lines · Krzysztof Kozlowski
Core already sets owner in
spi_driver.Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/net/ieee802154/ca8210.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ieee802154/ca8210.c +0
-0
drivers/net/ieee802154/ca8210.c MODULE_DEVICE_TABLE(of, ca8210_of_ids); · line 3185
Quoted 7 lines
drivers/net/ieee802154/ca8210.c +0
-1@@ -3180,7 +3180,6 @@ MODULE_DEVICE_TABLE(of, ca8210_of_ids);static struct spi_driver ca8210_spi_driver = { .driver = { .name =DRIVER_NAME , - .owner =THIS_MODULE , .of_match_table = ca8210_of_ids, }, .probe = ca8210_probe,
regards
Stefan Schmidt
Vladimir Oltean
maintainerQuoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>---
Do you happen to have any context as to why of_match_node() without CONFIG_OF is implemented as:
#define of_match_node(_matches, _node) NULL
and not as:
static inline const struct of_device_id *
of_match_node(const struct of_device_id *matches,
const struct device_node *node)
{
return NULL;
}?
Generally, the static inline shim function model is nicer, because it allows us to not scatter __maybe_unused all around.
Quoted 19 lines · Vladimir Oltean
Quoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>---
Do you happen to have any context as to why
of_match_node()withoutCONFIG_OFis implemented as:#define
of_match_node(_matches, _node)NULLand not as:
static inline const struct
of_device_id*
of_match_node(const structof_device_id*matches,
const structdevice_node*node)
Quoted 8 lines
{ return NULL; }?
Generally, the static inline shim function model is nicer, because it allows us to not scatter
__maybe_unusedall around.
Sorry, I don't follow. I don't touch that wrappers, just fix errors related to OF device ID tables, although in few cases it is indeed related to of_match_node.
Best regards,
Krzysztof
Vladimir Oltean
maintainerQuoted 24 lines · Krzysztof Kozlowski
Quoted 23 lines · Vladimir Oltean
Quoted 7 lines · Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>---
Do you happen to have any context as to why
of_match_node()withoutCONFIG_OFis implemented as:#define
of_match_node(_matches, _node)NULLand not as:
static inline const struct
of_device_id*
of_match_node(const structof_device_id*matches,
const structdevice_node*node){ return NULL; }
Quoted 8 lines
Quoted 4 lines
?
Generally, the static inline shim function model is nicer, because it allows us to not scatter
__maybe_unusedall around.Sorry, I don't follow. I don't touch that wrappers, just fix errors related to OF device ID tables, although in few cases it is indeed related to
of_match_node.
I'm saying this because in lantiq_gswip.c, xway_gphy_match is accessed through of_match_node(). If the shim definition for of_match_node() was different, the variable wouldn't have been unused with CONFIG_OF=n. I guess it's worth considering changing that wrapper instead of adding the __maybe_unused.
Jakub Kicinski
maintainerQuoted 9 lines · On Sun, 12 Mar 2023 12:57:29 +0200 Vladimir Oltean wrote:
Quoted 3 lines
Sorry, I don't follow. I don't touch that wrappers, just fix errors related to OF device ID tables, although in few cases it is indeed related to
of_match_node.I'm saying this because in
lantiq_gswip.c,xway_gphy_matchis accessed throughof_match_node(). If the shim definition forof_match_node()was different, the variable wouldn't have been unused withCONFIG_OF=n. I guess it's worth considering changing that wrapper instead of adding the__maybe_unused.
Hi Krzysztof, have you had a chance to check if using an empty static inline is enough to silence the compiler? Seems like it could save us quite some churn? Or do we want the of_match_node() decorations to go away in general?
Quoted 11 lines · Jakub Kicinski
Quoted 9 lines · On Sun, 12 Mar 2023 12:57:29 +0200 Vladimir Oltean wrote:
Quoted 3 lines
Sorry, I don't follow. I don't touch that wrappers, just fix errors related to OF device ID tables, although in few cases it is indeed related to
of_match_node.I'm saying this because in
lantiq_gswip.c,xway_gphy_matchis accessed throughof_match_node(). If the shim definition forof_match_node()was different, the variable wouldn't have been unused withCONFIG_OF=n. I guess it's worth considering changing that wrapper instead of adding the__maybe_unused.
Quoted 4 lines
Hi Krzysztof, have you had a chance to check if using an empty static inline is enough to silence the compiler? Seems like it could save us quite some churn? Or do we want the
of_match_node()decorations to go away in general?
I am pretty sure fixing of_match_node() and of_match_ptr() (independent case) would supersed this patchset, but it is a bit bigger change than I have available time now. I didn't try it yet.
Best regards,
Krzysztof
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 8 lines · On Sat, 11 Mar 2023 18:32:52 +0100 you wrote:
The driver can be compile tested with !CONFIG_OF making certain data unused:
drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>[...]
Here is the summary with links:
- [01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused
https://git.kernel.org/netdev/net-next/c/6ea1e67788f3 - [02/12] net: dsa: lan9303: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/ced5c5a0a2ea - [03/12] net: dsa: seville_vsc9953: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/1eb8566dd08d - [04/12] net: dsa: ksz9477: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/00923ff2e1ba - [05/12] net: dsa: ocelot: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/0f17b42827ae - [06/12] net: phy: ks8995: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/b0b7d1b6260b - [07/12] net: ieee802154: adf7242: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/3df09beef650 - [08/12] net: ieee802154: mcr20a: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/3896c40b7824 - [09/12] net: ieee802154: at86rf230: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/32b7030681a4 - [10/12] net: ieee802154: ca8210: drop of_match_ptr for ID table https://git.kernel.org/netdev/net-next/c/cdfe4fc4d946 - [11/12] net: ieee802154: adf7242: drop owner from driver https://git.kernel.org/netdev/net-next/c/059fa9972340 - [12/12] net: ieee802154: ca8210: drop owner from driver https://git.kernel.org/netdev/net-next/c/613a3c44a373
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Jakub Kicinski
maintainerQuoted 2 lines · On Wed, 15 Mar 2023 08:20:20 +0000 [email protected] wrote:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
:) :) :)