[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220711203501.4E464C34115@smtp.kernel.org>
Date: Mon, 11 Jul 2022 13:34:59 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Nathan Chancellor <nathan@...nel.org>
Cc: Konrad Dybcio <konrad.dybcio@...ainline.org>,
Michael Turquette <mturquette@...libre.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>,
Robert Foss <robert.foss@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Nathan Chancellor <nathan@...nel.org>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2] clk: qcom: gpucc-sm8350: Fix "initializer element is not constant" error
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@...el.com>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
Reviewed-by: Stephen Boyd <sboyd@...nel.org>
Powered by blists - more mailing lists