Skip to contentSkip to conversation

clk: pwm: drop of_match_ptr from of_device_id table

PATCH Applied Krzysztof Kozlowski 5 participants 21 messages Nov 3, 2020 – Dec 10, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 clk: pwm: drop of_match_ptr from of_device_id table

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/clk-pwm.c:139:34: warning:
‘clk_pwm_dt_ids’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/clk-pwm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-pwm.c +1 -1
index 86f2e2d3fc02..da2c8eddfd9f 100644
@@ -147,7 +147,7 @@ static struct platform_driver clk_pwm_driver = {
 	.remove = clk_pwm_remove,
 	.driver = {
 		.name = "pwm-clock",
-		.of_match_table = of_match_ptr(clk_pwm_dt_ids),
+		.of_match_table = clk_pwm_dt_ids,
 	},
 };
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/8 clk: imx8mm: drop of_match_ptr from of_device_id table

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mm.c:641:34: warning:
‘imx8mm_clk_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/imx/clk-imx8mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mm.c +1 -1
index 0de0be0cf548..e27890b61fb6 100644
@@ -653,7 +653,7 @@ static struct platform_driver imx8mm_clk_driver = {
 		 * reloading the driver will crash or break devices.
 		 */
 		.suppress_bind_attrs = true,
-		.of_match_table = of_match_ptr(imx8mm_clk_of_match),
+		.of_match_table = imx8mm_clk_of_match,
 	},
 };
 module_platform_driver(imx8mm_clk_driver);
Signature · 1 line
2.25.1
#4 lore raw

PATCH 3/8 clk: imx8mn: drop of_match_ptr from of_device_id table

In reply to 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mn.c:592:34: warning:
‘imx8mn_clk_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/imx/clk-imx8mn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mn.c +1 -1
index e984de543f0b..18f81419f355 100644
@@ -604,7 +604,7 @@ static struct platform_driver imx8mn_clk_driver = {
 		 * reloading the driver will crash or break devices.
 		 */
 		.suppress_bind_attrs = true,
-		.of_match_table = of_match_ptr(imx8mn_clk_of_match),
+		.of_match_table = imx8mn_clk_of_match,
 	},
 };
 module_platform_driver(imx8mn_clk_driver);
Signature · 1 line
2.25.1
#7 lore raw

PATCH 4/8 clk: imx8mp: drop of_match_ptr from of_device_id table

In reply to 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mp.c:751:34: warning:
‘imx8mp_clk_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/imx/clk-imx8mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mp.c +1 -1
index 12ce4770f702..5295a5156ab0 100644
@@ -763,7 +763,7 @@ static struct platform_driver imx8mp_clk_driver = {
 		 * reloading the driver will crash or break devices.
 		 */
 		.suppress_bind_attrs = true,
-		.of_match_table = of_match_ptr(imx8mp_clk_of_match),
+		.of_match_table = imx8mp_clk_of_match,
 	},
 };
 module_platform_driver(imx8mp_clk_driver);
Signature · 1 line
2.25.1
#10 lore raw

PATCH 5/8 clk: imx8mq: drop of_match_ptr from of_device_id table

In reply to 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mq.c:626:34: warning:
‘imx8mq_clk_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/imx/clk-imx8mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk-imx8mq.c +1 -1
index 8265d1d48af4..75186888ecae 100644
@@ -639,7 +639,7 @@ static struct platform_driver imx8mq_clk_driver = {
 		 * reloading the driver will crash or break devices.
 		 */
 		.suppress_bind_attrs = true,
-		.of_match_table = of_match_ptr(imx8mq_clk_of_match),
+		.of_match_table = imx8mq_clk_of_match,
 	},
 };
 module_platform_driver(imx8mq_clk_driver);
Signature · 1 line
2.25.1
#13 lore raw

PATCH 6/8 clk: renesas: r8a779a0-cpg-mssr: add static to local function

In reply to Krzysztof Kozlowski

The function rcar_r8a779a0_cpg_clk_register() is not used outside of the unit so it can be made static to fix compilation warning:

drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:21: warning:
no previous prototype for ‘rcar_r8a779a0_cpg_clk_register’ [-Wmissing-prototypes]

---
 drivers/clk/renesas/r8a779a0-cpg-mssr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/renesas/r8a779a0-cpg-mssr.c +1 -1
index 17ebbac7ddfb..7e25b3b8945b 100644
@@ -153,7 +153,7 @@ static const struct rcar_r8a779a0_cpg_pll_config *cpg_pll_config __initdata;
 static unsigned int cpg_clk_extalr __initdata;
 static u32 cpg_mode __initdata;
 
-struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
+static struct clk * __init rcar_r8a779a0_cpg_clk_register(struct device *dev,
 	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
 	struct clk **clks, void __iomem *base,
 	struct raw_notifier_head *notifiers)
Signature · 1 line
2.25.1
#15 lore raw

PATCH 7/8 clk: renesas: renesas-cpg-mssr: fix kerneldoc of cpg_mssr_priv

In reply to Krzysztof Kozlowski

The struct cpg_mssr_priv missed proper formatting:

drivers/clk/renesas/renesas-cpg-mssr.c:142: warning:
cannot understand function prototype: 'struct cpg_mssr_priv '

---
 drivers/clk/renesas/renesas-cpg-mssr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/renesas/renesas-cpg-mssr.c +2 -1
index 94db88370337..1c3215dc4877 100644
@@ -119,7 +119,8 @@ static const u16 srstclr_for_v3u[] = {
 };
 
 /**
- * Clock Pulse Generator / Module Standby and Software Reset Private Data
+ * struct cpg_mssr_priv - Clock Pulse Generator / Module Standby
+ *                        and Software Reset Private Data
  *
  * @rcdev: Optional reset controller entity
  * @dev: CPG/MSSR device
Signature · 1 line
2.25.1
#17 lore raw

PATCH 8/8 clk: scpi: mark scpi_clk_match as maybe unused

In reply to Krzysztof Kozlowski

The scpi_clk_match (struct of_device_id) is referenced only with CONFIG_OF builds thus mark it as __maybe_unused:

drivers/clk/clk-scpi.c:132:34: warning:
‘scpi_clk_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/clk/clk-scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-scpi.c +1 -1
index 5a9b140dd8c8..a39af7616b13 100644
@@ -129,7 +129,7 @@ static const struct clk_ops scpi_dvfs_ops = {
 	.set_rate = scpi_dvfs_set_rate,
 };
 
-static const struct of_device_id scpi_clk_match[] = {
+static const struct of_device_id scpi_clk_match[] __maybe_unused = {
 	{ .compatible = "arm,scpi-dvfs-clocks", .data = &scpi_dvfs_ops, },
 	{ .compatible = "arm,scpi-variable-clocks", .data = &scpi_clk_ops, },
 	{}
Signature · 1 line
2.25.1
Acked-by on v1 8/8
#18 lore raw

Re: [PATCH 8/8] clk: scpi: mark scpi_clk_match as maybe unused

Quoted 6 lines · Krzysztof Kozlowski

The scpi_clk_match (struct of_device_id) is referenced only with CONFIG_OF builds thus mark it as __maybe_unused:

drivers/clk/clk-scpi.c:132:34: warning:
‘scpi_clk_match’ defined but not used [-Wunused-const-variable=]

--
Regards,
Sudeep

Reviewed-by on v1 7/8
#16 lore raw

Re: [PATCH 7/8] clk: renesas: renesas-cpg-mssr: fix kerneldoc of cpg_mssr_priv

In reply to Krzysztof Kozlowski
Quoted 6 lines · Krzysztof Kozlowski

The struct cpg_mssr_priv missed proper formatting:

drivers/clk/renesas/renesas-cpg-mssr.c:142: warning:
cannot understand function prototype: 'struct cpg_mssr_priv '

i.e. will queue in renesas-clk-for-v5.11.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
#14 lore raw

Re: [PATCH 6/8] clk: renesas: r8a779a0-cpg-mssr: add static to local function

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Quoted 7 lines · Krzysztof Kozlowski

The function rcar_r8a779a0_cpg_clk_register() is not used outside of the unit so it can be made static to fix compilation warning:

drivers/clk/renesas/r8a779a0-cpg-mssr.c:156:21: warning:
no previous prototype for ‘rcar_r8a779a0_cpg_clk_register’ [-Wmissing-prototypes]

Thanks for your patch!
A fix for this is already queued in renesas-clk-for-v5.11:
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/?h=renesas-clk-for-v5.11&id=c3f207f6d23d01c0fa817fcd6118bbbc509abe39

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
maintainer Acked-by on v1 2/8
#2 lore raw

Re: [PATCH 2/8] clk: imx8mm: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:29)

Quoted 10 lines

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mm.c:641:34: warning:
‘imx8mm_clk_of_match’ defined but not used [-Wunused-const-variable=]

---

maintainer Acked-by on v1 3/8
#5 lore raw

Re: [PATCH 3/8] clk: imx8mn: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:30)

Quoted 10 lines

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mn.c:592:34: warning:
‘imx8mn_clk_of_match’ defined but not used [-Wunused-const-variable=]

---

maintainer Acked-by on v1 4/8
#8 lore raw

Re: [PATCH 4/8] clk: imx8mp: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:31)

Quoted 11 lines

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mp.c:751:34: warning:
‘imx8mp_clk_of_match’ defined but not used [-Wunused-const-variable=]

---

maintainer Acked-by on v1 5/8
#11 lore raw

Re: [PATCH 5/8] clk: imx8mq: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:32)

Quoted 10 lines

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mq.c:626:34: warning:
‘imx8mq_clk_of_match’ defined but not used [-Wunused-const-variable=]

---

Applied
#3 lore raw

Re: [PATCH 2/8] clk: imx8mm: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski
Quoted 9 lines · 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mm.c:641:34: warning:
‘imx8mm_clk_of_match’ defined but not used [-Wunused-const-variable=]

Applied, thanks.

Applied
#6 lore raw

Re: [PATCH 3/8] clk: imx8mn: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski
Quoted 9 lines · 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mn.c:592:34: warning:
‘imx8mn_clk_of_match’ defined but not used [-Wunused-const-variable=]

Applied, thanks.

Applied
#9 lore raw

Re: [PATCH 4/8] clk: imx8mp: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski
Quoted 10 lines · 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mp.c:751:34: warning:
‘imx8mp_clk_of_match’ defined but not used [-Wunused-const-variable=]

Applied, thanks.

Applied
#12 lore raw

Re: [PATCH 5/8] clk: imx8mq: drop of_match_ptr from of_device_id table

In reply to Krzysztof Kozlowski
Quoted 9 lines · 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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/imx/clk-imx8mq.c:626:34: warning:
‘imx8mq_clk_of_match’ defined but not used [-Wunused-const-variable=]

Applied, thanks.

maintainer Applied
#20 lore raw
In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:28)

Quoted 10 lines

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 be not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/clk/clk-pwm.c:139:34: warning:
‘clk_pwm_dt_ids’ defined but not used [-Wunused-const-variable=]

---

Applied to clk-next

maintainer Applied
#19 lore raw

Re: [PATCH 8/8] clk: scpi: mark scpi_clk_match as maybe unused

In reply to Krzysztof Kozlowski

Quoting Krzysztof Kozlowski (2020-11-03 08:24:35)

Quoted 8 lines

The scpi_clk_match (struct of_device_id) is referenced only with CONFIG_OF builds thus mark it as __maybe_unused:

drivers/clk/clk-scpi.c:132:34: warning:
‘scpi_clk_match’ defined but not used [-Wunused-const-variable=]

---

Applied to clk-next