[PATCH v2 1/2] lib: utils/fdt_cppc_rpmi: Fix compile error with LLVM

Samuel Holland samuel.holland at sifive.com
Tue Dec 10 16:05:55 PST 2024


On 2024-12-09 11:23 PM, Anup Patel wrote:
> The following error is observed when compiling fdt_cppc_rpmi
> driver using LLVM:
> 
> lib/utils/cppc/fdt_cppc_rpmi.c:87:3: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions]
>    87 |                 u64 db_val_u64 = 0;
> 
> To fix the above issue, move the variable declaration at the
> start of function.
> 
> Fixes: 591a98bdd549 ("lib: utils/cppc: Add RPMI CPPC driver")
> Signed-off-by: Anup Patel <apatel at ventanamicro.com>
> ---
>  lib/utils/cppc/fdt_cppc_rpmi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Reviewed-by: Samuel Holland <samuel.holland at sifive.com>




More information about the opensbi mailing list