lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] clk: qcom: gpucc-sm8350: Fix "initializer element is not constant" error
From
Date
Quoting Nathan Chancellor (2022-07-11 10:40:05)
> When building with clang or GCC older than 8, errors along the following
> lines occur:
>
> drivers/clk/qcom/gpucc-sm8350.c:111:2: error: initializer element is not a compile-time constant
> gpu_cc_parent,
> ^~~~~~~~~~~~~
> drivers/clk/qcom/gpucc-sm8350.c:126:2: error: initializer element is not a compile-time constant
> gpu_cc_parent,
> ^~~~~~~~~~~~~
> 2 errors generated.
>
> The C standard allows an implementation to accept other forms of
> constant expressions, which GCC 8+ has chosen to do, but it is not
> required. Just inline the initializer to resolve the error.
>
> Fixes: 160758b05ab1 ("clk: qcom: add support for SM8350 GPUCC")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1660
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

\
 
 \ /
  Last update: 2022-07-11 22:36    [W:0.036 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site