From: Zong Li <zong.li@sifive.com> To: mturquette@baylibre.com, sboyd@kernel.org, palmer@dabbelt.com, paul.walmsley@sifive.com, lee.jones@linaro.org, linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Zong Li <zong.li@sifive.com> Subject: [PATCH 1/1] clk: sifive: Fix W=1 kernel build warning Date: Wed, 8 Dec 2021 10:04:22 +0800 [thread overview] Message-ID: <d2e681e5ea31c62529b619a3777570b4792e0684.1638928796.git.zong.li@sifive.com> (raw) This commit reverts commit 487dc7bb6a0c ("clk: sifive: fu540-prci: Declare static const variable 'prci_clk_fu540' where it's used"). For fixing W=1 kernel build warning(s) about ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=], we should just remove the header including in fu540 and fu740 implementation respectively, because they don't actually use these static variables. After that, we could still separate SoCs-dependent data in their own defination, rather than put it in the common core code. Signed-off-by: Zong Li <zong.li@sifive.com> --- drivers/clk/sifive/fu540-prci.c | 1 - drivers/clk/sifive/fu540-prci.h | 5 +++++ drivers/clk/sifive/fu740-prci.c | 1 - drivers/clk/sifive/sifive-prci.c | 5 ----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index 29bab915003c..40ee5ab1748d 100644 --- a/drivers/clk/sifive/fu540-prci.c +++ b/drivers/clk/sifive/fu540-prci.c @@ -20,7 +20,6 @@ #include <dt-bindings/clock/sifive-fu540-prci.h> -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h index c220677dc010..c8271efa7bdc 100644 --- a/drivers/clk/sifive/fu540-prci.h +++ b/drivers/clk/sifive/fu540-prci.h @@ -13,4 +13,9 @@ extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540]; +static const struct prci_clk_desc prci_clk_fu540 = { + .clks = __prci_init_clocks_fu540, + .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), +}; + #endif /* __SIFIVE_CLK_FU540_PRCI_H */ diff --git a/drivers/clk/sifive/fu740-prci.c b/drivers/clk/sifive/fu740-prci.c index 53f6e00a03b9..e1da4eec0786 100644 --- a/drivers/clk/sifive/fu740-prci.c +++ b/drivers/clk/sifive/fu740-prci.c @@ -8,7 +8,6 @@ #include <dt-bindings/clock/sifive-fu740-prci.h> -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index 80a288c59e56..916d2fc28b9c 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -12,11 +12,6 @@ #include "fu540-prci.h" #include "fu740-prci.h" -static const struct prci_clk_desc prci_clk_fu540 = { - .clks = __prci_init_clocks_fu540, - .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), -}; - /* * Private functions */ -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: Zong Li <zong.li@sifive.com> To: mturquette@baylibre.com, sboyd@kernel.org, palmer@dabbelt.com, paul.walmsley@sifive.com, lee.jones@linaro.org, linux-clk@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Zong Li <zong.li@sifive.com> Subject: [PATCH 1/1] clk: sifive: Fix W=1 kernel build warning Date: Wed, 8 Dec 2021 10:04:22 +0800 [thread overview] Message-ID: <d2e681e5ea31c62529b619a3777570b4792e0684.1638928796.git.zong.li@sifive.com> (raw) This commit reverts commit 487dc7bb6a0c ("clk: sifive: fu540-prci: Declare static const variable 'prci_clk_fu540' where it's used"). For fixing W=1 kernel build warning(s) about ‘prci_clk_fu540’ defined but not used [-Wunused-const-variable=], we should just remove the header including in fu540 and fu740 implementation respectively, because they don't actually use these static variables. After that, we could still separate SoCs-dependent data in their own defination, rather than put it in the common core code. Signed-off-by: Zong Li <zong.li@sifive.com> --- drivers/clk/sifive/fu540-prci.c | 1 - drivers/clk/sifive/fu540-prci.h | 5 +++++ drivers/clk/sifive/fu740-prci.c | 1 - drivers/clk/sifive/sifive-prci.c | 5 ----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c index 29bab915003c..40ee5ab1748d 100644 --- a/drivers/clk/sifive/fu540-prci.c +++ b/drivers/clk/sifive/fu540-prci.c @@ -20,7 +20,6 @@ #include <dt-bindings/clock/sifive-fu540-prci.h> -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/fu540-prci.h b/drivers/clk/sifive/fu540-prci.h index c220677dc010..c8271efa7bdc 100644 --- a/drivers/clk/sifive/fu540-prci.h +++ b/drivers/clk/sifive/fu540-prci.h @@ -13,4 +13,9 @@ extern struct __prci_clock __prci_init_clocks_fu540[NUM_CLOCK_FU540]; +static const struct prci_clk_desc prci_clk_fu540 = { + .clks = __prci_init_clocks_fu540, + .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), +}; + #endif /* __SIFIVE_CLK_FU540_PRCI_H */ diff --git a/drivers/clk/sifive/fu740-prci.c b/drivers/clk/sifive/fu740-prci.c index 53f6e00a03b9..e1da4eec0786 100644 --- a/drivers/clk/sifive/fu740-prci.c +++ b/drivers/clk/sifive/fu740-prci.c @@ -8,7 +8,6 @@ #include <dt-bindings/clock/sifive-fu740-prci.h> -#include "fu540-prci.h" #include "sifive-prci.h" /* PRCI integration data for each WRPLL instance */ diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c index 80a288c59e56..916d2fc28b9c 100644 --- a/drivers/clk/sifive/sifive-prci.c +++ b/drivers/clk/sifive/sifive-prci.c @@ -12,11 +12,6 @@ #include "fu540-prci.h" #include "fu740-prci.h" -static const struct prci_clk_desc prci_clk_fu540 = { - .clks = __prci_init_clocks_fu540, - .num_clks = ARRAY_SIZE(__prci_init_clocks_fu540), -}; - /* * Private functions */ -- 2.31.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2021-12-08 2:04 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-08 2:04 Zong Li [this message] 2021-12-08 2:04 ` [PATCH 1/1] clk: sifive: Fix W=1 kernel build warning Zong Li 2021-12-08 8:31 ` Andreas Schwab 2021-12-08 8:31 ` Andreas Schwab 2021-12-08 9:22 ` Zong Li 2021-12-08 9:22 ` Zong Li
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d2e681e5ea31c62529b619a3777570b4792e0684.1638928796.git.zong.li@sifive.com \ --to=zong.li@sifive.com \ --cc=lee.jones@linaro.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=mturquette@baylibre.com \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ --cc=sboyd@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.