diff mbox series

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

Message ID 20201103162435.13689-8-krzk@kernel.org (mailing list archive)
State Awaiting Upstream
Delegated to: Geert Uytterhoeven
Headers show
Series [1/8] clk: pwm: drop of_match_ptr from of_device_id table | expand

Commit Message

Krzysztof Kozlowski Nov. 3, 2020, 4:24 p.m. UTC
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=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/clk/clk-scpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sudeep Holla Nov. 4, 2020, 9 a.m. UTC | #1
On Tue, Nov 03, 2020 at 05:24:35PM +0100, Krzysztof Kozlowski wrote:
> 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=]
>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

--
Regards,
Sudeep
Stephen Boyd Dec. 10, 2020, 8:24 p.m. UTC | #2
Quoting Krzysztof Kozlowski (2020-11-03 08:24:35)
> 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=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index 5a9b140dd8c8..a39af7616b13 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -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, },
 	{}