Skip to content

Commit b5eb8cd

Browse files
Ren Zhijieandersson
authored andcommitted
clk: qcom: fix build error initializer element is not constant
CONFIG_CC_VERSION_TEXT="x86_64-linux-gnu-gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0" make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: drivers/clk/qcom/gpucc-sm8350.c:111:2: error: initializer element is not constant gpu_cc_parent, ^~~~~~~~~~~~~ drivers/clk/qcom/gpucc-sm8350.c:111:2: note: (near initialization for ‘gpu_cc_parent_data_0[0]’) drivers/clk/qcom/gpucc-sm8350.c:126:2: error: initializer element is not constant gpu_cc_parent, ^~~~~~~~~~~~~ drivers/clk/qcom/gpucc-sm8350.c:126:2: note: (near initialization for ‘gpu_cc_parent_data_1[0]’) make[3]: *** [drivers/clk/qcom/gpucc-sm8350.o] Error 1 It seems that nested constant initializer is not supported in GCC 7.4.0. For portability resons, we should fix it. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 160758b ("clk: qcom: add support for SM8350 GPUCC") Signed-off-by: Ren Zhijie <renzhijie2@huawei.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220714121144.71062-1-renzhijie2@huawei.com
1 parent 2b4e75a commit b5eb8cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/clk/qcom/gpucc-sm8350.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static const struct parent_map gpu_cc_parent_map_0[] = {
108108
};
109109

110110
static const struct clk_parent_data gpu_cc_parent_data_0[] = {
111-
gpu_cc_parent,
111+
{ .fw_name = "bi_tcxo" },
112112
{ .hw = &gpu_cc_pll0.clkr.hw },
113113
{ .hw = &gpu_cc_pll1.clkr.hw },
114114
{ .fw_name = "gcc_gpu_gpll0_clk_src" },
@@ -123,7 +123,7 @@ static const struct parent_map gpu_cc_parent_map_1[] = {
123123
};
124124

125125
static const struct clk_parent_data gpu_cc_parent_data_1[] = {
126-
gpu_cc_parent,
126+
{ .fw_name = "bi_tcxo" },
127127
{ .hw = &gpu_cc_pll1.clkr.hw },
128128
{ .fw_name = "gcc_gpu_gpll0_clk_src" },
129129
{ .fw_name = "gcc_gpu_gpll0_div_clk_src" },

0 commit comments

Comments
 (0)