diff mbox series

[1/2] pwm: rcar: drop of_match_ptr for ID table

Message ID 20230311173735.263293-1-krzysztof.kozlowski@linaro.org
State Changes Requested
Headers show
Series [1/2] pwm: rcar: drop of_match_ptr for ID table | expand

Commit Message

Krzysztof Kozlowski March 11, 2023, 5:37 p.m. UTC
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(-)

Comments

Uwe Kleine-König March 12, 2023, 1:46 p.m. UTC | #1
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
Krzysztof Kozlowski March 12, 2023, 1:47 p.m. UTC | #2
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
diff mbox series

Patch

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);