[PATCH v4] clk: sifive: Fix W=1 kernel build warning
Lee Jones
lee.jones at linaro.org
Mon Jan 10 01:51:07 PST 2022
On Mon, 10 Jan 2022, Zong Li wrote:
> 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=], the problem is that the C file
> of fu540 and fu740 doesn't use these variables, but they include the
> header files. We could refine the code by moving the definition of these
> variables into fu540 and fu740 implementation respectively instead of
> common core code, then we could still separate the SoCs-dependent data
> in their own implementation.
>
> Fixes: 487dc7bb6a0c ("clk: sifive: fu540-prci: Declare static const variable 'prci_clk_fu540' where it's used")
Okay, that's good.
My other comments still apply here though.
> Signed-off-by: Zong Li <zong.li at sifive.com>
>
> ---
> Changed in v4:
> - Rebase on v5.16
> - Modify fixes tag
>
> Changed in v3:
> - Rebase on v5.16-rc8
> - Add fixes tag
>
> Changed in v2:
> - Move definition of variable to C file from header
> ---
> drivers/clk/sifive/fu540-prci.c | 6 +++++-
> drivers/clk/sifive/fu540-prci.h | 6 +-----
> drivers/clk/sifive/fu740-prci.c | 6 +++++-
> drivers/clk/sifive/fu740-prci.h | 11 +----------
> drivers/clk/sifive/sifive-prci.c | 5 -----
> 5 files changed, 12 insertions(+), 22 deletions(-)
--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
More information about the linux-riscv
mailing list