* [PATCH 1/2] soc: renesas: mark OF related data as maybe unused
@ 2023-03-12 13:26 Krzysztof Kozlowski
2023-03-12 13:26 ` [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-13 12:33 ` [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Geert Uytterhoeven
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 13:26 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, linux-kernel
Cc: Krzysztof Kozlowski
The driver can be compile tested with !CONFIG_OF making certain data
unused:
drivers/soc/renesas/renesas-soc.c:272:34: error: ‘renesas_socs’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/soc/renesas/renesas-soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c
index 468ebce1ea88..9e0a5707d917 100644
--- a/drivers/soc/renesas/renesas-soc.c
+++ b/drivers/soc/renesas/renesas-soc.c
@@ -269,7 +269,7 @@ static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = {
};
-static const struct of_device_id renesas_socs[] __initconst = {
+static const struct of_device_id renesas_socs[] __initconst __maybe_unused = {
#ifdef CONFIG_ARCH_R7S72100
{ .compatible = "renesas,r7s72100", .data = &soc_rz_a1h },
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table
2023-03-12 13:26 [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Krzysztof Kozlowski
@ 2023-03-12 13:26 ` Krzysztof Kozlowski
2023-03-13 14:06 ` Geert Uytterhoeven
2023-03-13 12:33 ` [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Geert Uytterhoeven
1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-12 13:26 UTC (permalink / raw)
To: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, linux-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/soc/renesas/pwc-rzv2m.c:124:34: error: ‘rzv2m_pwc_of_match’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/soc/renesas/pwc-rzv2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/renesas/pwc-rzv2m.c b/drivers/soc/renesas/pwc-rzv2m.c
index c83bdbdabb64..452cee8d68be 100644
--- a/drivers/soc/renesas/pwc-rzv2m.c
+++ b/drivers/soc/renesas/pwc-rzv2m.c
@@ -131,7 +131,7 @@ static struct platform_driver rzv2m_pwc_driver = {
.probe = rzv2m_pwc_probe,
.driver = {
.name = "rzv2m_pwc",
- .of_match_table = of_match_ptr(rzv2m_pwc_of_match),
+ .of_match_table = rzv2m_pwc_of_match,
},
};
module_platform_driver(rzv2m_pwc_driver);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] soc: renesas: mark OF related data as maybe unused
2023-03-12 13:26 [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-12 13:26 ` [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-13 12:33 ` Geert Uytterhoeven
2023-03-13 14:04 ` Geert Uytterhoeven
1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-03-13 12:33 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Magnus Damm, linux-renesas-soc, linux-kernel
Hi Krzysztof,
Thanks for your patch!
On Sun, Mar 12, 2023 at 2:26 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> The driver can be compile tested with !CONFIG_OF making certain data
> unused:
>
> drivers/soc/renesas/renesas-soc.c:272:34: error: ‘renesas_socs’ defined but not used [-Werror=unused-const-variable=]
Where do you see this issue?
This variable is used unconditionally, and the driver builds fine for
me for m68k/allmodconfig+CONFIG_OF=n?
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> --- a/drivers/soc/renesas/renesas-soc.c
> +++ b/drivers/soc/renesas/renesas-soc.c
> @@ -269,7 +269,7 @@ static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = {
> };
>
>
> -static const struct of_device_id renesas_socs[] __initconst = {
> +static const struct of_device_id renesas_socs[] __initconst __maybe_unused = {
> #ifdef CONFIG_ARCH_R7S72100
> { .compatible = "renesas,r7s72100", .data = &soc_rz_a1h },
> #endif
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] soc: renesas: mark OF related data as maybe unused
2023-03-13 12:33 ` [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Geert Uytterhoeven
@ 2023-03-13 14:04 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-03-13 14:04 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Magnus Damm, linux-renesas-soc, linux-kernel
On Mon, Mar 13, 2023 at 1:33 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Mar 12, 2023 at 2:26 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> > The driver can be compile tested with !CONFIG_OF making certain data
> > unused:
> >
> > drivers/soc/renesas/renesas-soc.c:272:34: error: ‘renesas_socs’ defined but not used [-Werror=unused-const-variable=]
>
> Where do you see this issue?
With W=1, as of_match_node() is a dummy macro, not an inline
function.
> This variable is used unconditionally, and the driver builds fine for
> me for m68k/allmodconfig+CONFIG_OF=n?
>
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.4.
> > --- a/drivers/soc/renesas/renesas-soc.c
> > +++ b/drivers/soc/renesas/renesas-soc.c
> > @@ -269,7 +269,7 @@ static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = {
> > };
> >
> >
> > -static const struct of_device_id renesas_socs[] __initconst = {
> > +static const struct of_device_id renesas_socs[] __initconst __maybe_unused = {
> > #ifdef CONFIG_ARCH_R7S72100
> > { .compatible = "renesas,r7s72100", .data = &soc_rz_a1h },
> > #endif
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table
2023-03-12 13:26 ` [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-13 14:06 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-03-13 14:06 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Magnus Damm, linux-renesas-soc, linux-kernel
Hi Krzysztof,
Thanks for your patch!
On Sun, Mar 12, 2023 at 2:26 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> 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:
Only seen with W=1.
> drivers/soc/renesas/pwc-rzv2m.c:124:34: error: ‘rzv2m_pwc_of_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.4.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-13 14:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 13:26 [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-12 13:26 ` [PATCH 2/2] soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-13 14:06 ` Geert Uytterhoeven
2023-03-13 12:33 ` [PATCH 1/2] soc: renesas: mark OF related data as maybe unused Geert Uytterhoeven
2023-03-13 14:04 ` Geert Uytterhoeven
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).