mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table
@ 2023-03-11 17:37 Krzysztof Kozlowski
  2023-03-11 17:37 ` [PATCH 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
  2023-03-12 13:46 ` [PATCH 1/2] pwm: rcar: " Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:37 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Fabrice Gasnier,
	Maxime Coquelin, Alexandre Torgue, linux-pwm, linux-kernel,
	linux-stm32, linux-arm-kernel
  Cc: Krzysztof Kozlowski

The 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/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/pwm/pwm-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
index 55f46d09602b..8f31f3cc93d5 100644
--- a/drivers/pwm/pwm-rcar.c
+++ b/drivers/pwm/pwm-rcar.c
@@ -260,7 +260,7 @@ static struct platform_driver rcar_pwm_driver = {
 	.remove = rcar_pwm_remove,
 	.driver = {
 		.name = "pwm-rcar",
-		.of_match_table = of_match_ptr(rcar_pwm_of_table),
+		.of_match_table = rcar_pwm_of_table,
 	}
 };
 module_platform_driver(rcar_pwm_driver);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] pwm: stm32-lp: drop of_match_ptr for ID table
  2023-03-11 17:37 [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-11 17:37 ` Krzysztof Kozlowski
  2023-03-12 13:46 ` [PATCH 1/2] pwm: rcar: " Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:37 UTC (permalink / raw)
  To: Thierry Reding, Uwe Kleine-König, Fabrice Gasnier,
	Maxime Coquelin, Alexandre Torgue, linux-pwm, linux-kernel,
	linux-stm32, linux-arm-kernel
  Cc: Krzysztof Kozlowski

The 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/pwm/pwm-stm32-lp.c:245:34: error: ‘stm32_pwm_lp_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/pwm/pwm-stm32-lp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index f315fa106be8..bb3a045a7334 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -252,7 +252,7 @@ static struct platform_driver stm32_pwm_lp_driver = {
 	.probe	= stm32_pwm_lp_probe,
 	.driver	= {
 		.name = "stm32-pwm-lp",
-		.of_match_table = of_match_ptr(stm32_pwm_lp_of_match),
+		.of_match_table = stm32_pwm_lp_of_match,
 		.pm = &stm32_pwm_lp_pm_ops,
 	},
 };
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table
  2023-03-11 17:37 [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-11 17:37 ` [PATCH 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
@ 2023-03-12 13:46 ` Uwe Kleine-König
  2023-03-12 13:47   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 13:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Thierry Reding, Fabrice Gasnier, Maxime Coquelin,
	Alexandre Torgue, linux-pwm, linux-kernel, linux-stm32,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

On Sat, Mar 11, 2023 at 06:37:34PM +0100, Krzysztof Kozlowski wrote:
> The 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/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]

The commit log text sounds like a harmless optimisation, but the error
message here either means you're fixing a compile failure, or (and?) the
patch was sent out before the commit log was finalized.

Looking at it this is the error message that triggers if you compile
this driver with OF unset. I'd like to have that mentioned, then the
patch looks fine. Ditto for the 2nd patch in this series.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table
  2023-03-12 13:46 ` [PATCH 1/2] pwm: rcar: " Uwe Kleine-König
@ 2023-03-12 13:47   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 13:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Thierry Reding, Fabrice Gasnier, Maxime Coquelin,
	Alexandre Torgue, linux-pwm, linux-kernel, linux-stm32,
	linux-arm-kernel

On 12/03/2023 14:46, Uwe Kleine-König wrote:
> On Sat, Mar 11, 2023 at 06:37:34PM +0100, Krzysztof Kozlowski wrote:
>> The 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/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]
> 
> The commit log text sounds like a harmless optimisation, but the error
> message here either means you're fixing a compile failure, or (and?) the
> patch was sent out before the commit log was finalized.
> 
> Looking at it this is the error message that triggers if you compile
> this driver with OF unset. I'd like to have that mentioned, then the
> patch looks fine. Ditto for the 2nd patch in this series.

Sure, ack!

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-12 13:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 17:37 [PATCH 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-11 17:37 ` [PATCH 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
2023-03-12 13:46 ` [PATCH 1/2] pwm: rcar: " Uwe Kleine-König
2023-03-12 13:47   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®