* [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
@ 2023-03-12 13:51 Krzysztof Kozlowski
2023-03-12 13:51 ` [PATCH v2 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 13:51 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). This
also fixes !CONFIG_OF error:
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>
---
Changes since v1:
1. Extend commit msg.
---
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 related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] pwm: stm32-lp: drop of_match_ptr for ID table
2023-03-12 13:51 [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-12 13:51 ` Krzysztof Kozlowski
2023-03-12 15:42 ` [PATCH v2 1/2] pwm: rcar: " Uwe Kleine-König
2023-04-06 13:45 ` Thierry Reding
2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 13:51 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). This
also fixes !CONFIG_OF error:
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>
---
Changes since v1:
1. Extend commit msg.
---
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 related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
2023-03-12 13:51 [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-12 13:51 ` [PATCH v2 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
@ 2023-03-12 15:42 ` Uwe Kleine-König
2023-03-22 18:12 ` Krzysztof Kozlowski
2023-04-06 13:45 ` Thierry Reding
2 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2023-03-12 15:42 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: 2020 bytes --]
Hello,
On Sun, Mar 12, 2023 at 02:51:19PM +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). This
> also fixes !CONFIG_OF error:
>
> 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>
Hmm, I wonder what else is required here to trigger that warning. On
amd64 I also disabled CONFIG_MODULES as otherwise rcar_pwm_of_table is
used by
MODULE_DEVICE_TABLE(of, rcar_pwm_of_table);
With that I have:
uwe@taurus:~/work/kbuild/amd64$ make drivers/pwm/pwm-rcar.o
GEN Makefile
CALL /home/uwe/gsrc/linux/scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CC drivers/pwm/pwm-rcar.o
uwe@taurus:~/work/kbuild/amd64$ make drivers/pwm/pwm-rcar.i
GEN Makefile
CALL /home/uwe/gsrc/linux/scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CPP drivers/pwm/pwm-rcar.i
uwe@taurus:~/work/kbuild/amd64$ grep rcar_pwm_of_table drivers/pwm/pwm-rcar.i
static const struct of_device_id rcar_pwm_of_table[] = {
... some time later ...
ah, you also need W=1 to get that warning because of
# These warnings generated too much noise in a regular build.
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
in the toplevel Makefile.
I guess that explains why there is no previous report by one of the
build bots about this issue.
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] 6+ messages in thread
* Re: [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
2023-03-12 15:42 ` [PATCH v2 1/2] pwm: rcar: " Uwe Kleine-König
@ 2023-03-22 18:12 ` Krzysztof Kozlowski
2023-03-22 20:59 ` Uwe Kleine-König
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-22 18:12 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 16:42, Uwe Kleine-König wrote:
> Hello,
>
> On Sun, Mar 12, 2023 at 02:51:19PM +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). This
>> also fixes !CONFIG_OF error:
>>
>> 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>
>
> Hmm, I wonder what else is required here to trigger that warning. On
> amd64 I also disabled CONFIG_MODULES as otherwise rcar_pwm_of_table is
> used by
>
> MODULE_DEVICE_TABLE(of, rcar_pwm_of_table);
1. x86_64 allyesconfig, remove CONFIG_OF
2. Build with W=1 (this was GCC)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
2023-03-22 18:12 ` Krzysztof Kozlowski
@ 2023-03-22 20:59 ` Uwe Kleine-König
0 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2023-03-22 20:59 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: 1544 bytes --]
Hello Krzysztof,
On Wed, Mar 22, 2023 at 07:12:08PM +0100, Krzysztof Kozlowski wrote:
> On 12/03/2023 16:42, Uwe Kleine-König wrote:
> > Hello,
> >
> > On Sun, Mar 12, 2023 at 02:51:19PM +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). This
> >> also fixes !CONFIG_OF error:
> >>
> >> 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>
> >
> > Hmm, I wonder what else is required here to trigger that warning. On
> > amd64 I also disabled CONFIG_MODULES as otherwise rcar_pwm_of_table is
> > used by
> >
> > MODULE_DEVICE_TABLE(of, rcar_pwm_of_table);
>
> 1. x86_64 allyesconfig, remove CONFIG_OF
> 2. Build with W=1 (this was GCC)
Ah right, it's not that CONFIG_MODULES must be unset, but the driver
must not be configured as module. So I suggest
This also fixes the compiler warning
drivers/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=]
for builds with CONFIG_OF=n, CONFIG_PWM_RCAR=y and W=1.
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] 6+ messages in thread
* Re: [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table
2023-03-12 13:51 [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-12 13:51 ` [PATCH v2 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
2023-03-12 15:42 ` [PATCH v2 1/2] pwm: rcar: " Uwe Kleine-König
@ 2023-04-06 13:45 ` Thierry Reding
2 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2023-04-06 13:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Uwe Kleine-König, Fabrice Gasnier, Maxime Coquelin,
Alexandre Torgue, linux-pwm, linux-kernel, linux-stm32,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On Sun, Mar 12, 2023 at 02:51:19PM +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). This
> also fixes !CONFIG_OF error:
>
> 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>
>
> ---
>
> Changes since v1:
> 1. Extend commit msg.
> ---
> drivers/pwm/pwm-rcar.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I've applied both patches with an updated commit message clarifying the
exact configuration as pointed out by Uwe.
Thanks,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-06 13:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 13:51 [PATCH v2 1/2] pwm: rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-12 13:51 ` [PATCH v2 2/2] pwm: stm32-lp: " Krzysztof Kozlowski
2023-03-12 15:42 ` [PATCH v2 1/2] pwm: rcar: " Uwe Kleine-König
2023-03-22 18:12 ` Krzysztof Kozlowski
2023-03-22 20:59 ` Uwe Kleine-König
2023-04-06 13:45 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).