[PATCH 1/1] clk: sifive: Fix W=1 kernel build warning

Andreas Schwab schwab at linux-m68k.org
Wed Dec 8 00:31:18 PST 2021


On Dez 08 2021, Zong Li wrote:

> 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),
> +};
> +

A header should only declare things, not define them.

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



More information about the linux-riscv mailing list