diff mbox series

[07/12] net: ieee802154: adf7242: drop of_match_ptr for ID table

Message ID 20230311173303.262618-7-krzysztof.kozlowski@linaro.org (mailing list archive)
State Handled Elsewhere
Headers show
Series [01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused | expand

Commit Message

Krzysztof Kozlowski March 11, 2023, 5:32 p.m. UTC
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 <krzysztof.kozlowski@linaro.org>
---
 drivers/net/ieee802154/adf7242.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hennerich, Michael March 12, 2023, 11:31 a.m. UTC | #1
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Samstag, 11. März 2023 18:33
> To: Andrew Lunn <andrew@lunn.ch>; Florian Fainelli <f.fainelli@gmail.com>;
> Vladimir Oltean <olteanv@gmail.com>; David S. Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Hauke
> Mehrtens <hauke@hauke-m.de>; Woojung Huh
> <woojung.huh@microchip.com>; UNGLinuxDriver@microchip.com; Claudiu
> Manoil <claudiu.manoil@nxp.com>; Alexandre Belloni
> <alexandre.belloni@bootlin.com>; Colin Foster <colin.foster@in-
> advantage.com>; Hennerich, Michael <Michael.Hennerich@analog.com>;
> Alexander Aring <alex.aring@gmail.com>; Stefan Schmidt
> <stefan@datenfreihafen.org>; Miquel Raynal <miquel.raynal@bootlin.com>;
> Heiner Kallweit <hkallweit1@gmail.com>; Russell King
> <linux@armlinux.org.uk>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-wpan@vger.kernel.org
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Subject: [PATCH 07/12] net: ieee802154: adf7242: drop of_match_ptr for ID
> table
> 
> 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 <krzysztof.kozlowski@linaro.org>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>  drivers/net/ieee802154/adf7242.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ieee802154/adf7242.c
> b/drivers/net/ieee802154/adf7242.c
> index 5cf218c674a5..509acc86001c 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -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
Miquel Raynal March 28, 2023, 10:48 a.m. UTC | #2
Hi Krzysztof,

krzysztof.kozlowski@linaro.org wrote on Sat, 11 Mar 2023 18:32:58 +0100:

> 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 <krzysztof.kozlowski@linaro.org>

I see Stefan already acked most of the ieee802154 patches, but I didn't
got notified for this one, so in case:

Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>

> ---
>  drivers/net/ieee802154/adf7242.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
> index 5cf218c674a5..509acc86001c 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -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 March 28, 2023, 4:13 p.m. UTC | #3
Hello.

On 28.03.23 12:48, Miquel Raynal wrote:
> Hi Krzysztof,
> 
> krzysztof.kozlowski@linaro.org wrote on Sat, 11 Mar 2023 18:32:58 +0100:
> 
>> 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 <krzysztof.kozlowski@linaro.org>
> 
> 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
diff mbox series

Patch

diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
index 5cf218c674a5..509acc86001c 100644
--- a/drivers/net/ieee802154/adf7242.c
+++ b/drivers/net/ieee802154/adf7242.c
@@ -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,
 		   },