2021-07-18 18:54:10

by kernel test robot

[permalink] [raw]
Subject: [linux-chenxing:mstar_v5_14_rebase_i2_drm 257/349] drivers/clk/mstar/clk-msc313-mux.c:27:2: error: implicit declaration of function 'regmap_field_read'; did you mean 'regmap_field_write'?

tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase_i2_drm
head: 93dfb2364436067bf34c6d4ddcd282496182cc0f
commit: 395724ba20fe2aa13e0167b43b6914f94f128df0 [257/349] clk: mstar: msc313 clock mux base
config: mips-bigsur_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/linux-chenxing/linux/commit/395724ba20fe2aa13e0167b43b6914f94f128df0
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase_i2_drm
git checkout 395724ba20fe2aa13e0167b43b6914f94f128df0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/clk/mstar/clk-msc313-mux.c: In function 'msc313_mux_mux_get_parent':
>> drivers/clk/mstar/clk-msc313-mux.c:27:2: error: implicit declaration of function 'regmap_field_read'; did you mean 'regmap_field_write'? [-Werror=implicit-function-declaration]
27 | regmap_field_read(mux->mux, &index);
| ^~~~~~~~~~~~~~~~~
| regmap_field_write
drivers/clk/mstar/clk-msc313-mux.c: In function 'msc313_mux_register_muxes':
>> drivers/clk/mstar/clk-msc313-mux.c:146:10: error: variable 'gate_field' has initializer but incomplete type
146 | struct reg_field gate_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:146:33: error: implicit declaration of function 'REG_FIELD' [-Werror=implicit-function-declaration]
146 | struct reg_field gate_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:146:20: error: storage size of 'gate_field' isn't known
146 | struct reg_field gate_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:148:10: error: variable 'mux_field' has initializer but incomplete type
148 | struct reg_field mux_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:148:20: error: storage size of 'mux_field' isn't known
148 | struct reg_field mux_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:150:10: error: variable 'deglitch_field' has initializer but incomplete type
150 | struct reg_field deglitch_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:150:20: error: storage size of 'deglitch_field' isn't known
150 | struct reg_field deglitch_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~~~~~~
>> drivers/clk/mstar/clk-msc313-mux.c:157:16: error: implicit declaration of function 'devm_regmap_field_alloc' [-Werror=implicit-function-declaration]
157 | mux->gate = devm_regmap_field_alloc(dev, regmap, gate_field);
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/mstar/clk-msc313-mux.c:150:20: warning: unused variable 'deglitch_field' [-Wunused-variable]
150 | struct reg_field deglitch_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~~~~~~
drivers/clk/mstar/clk-msc313-mux.c:148:20: warning: unused variable 'mux_field' [-Wunused-variable]
148 | struct reg_field mux_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~
drivers/clk/mstar/clk-msc313-mux.c:146:20: warning: unused variable 'gate_field' [-Wunused-variable]
146 | struct reg_field gate_field = REG_FIELD(mux_data->offset,
| ^~~~~~~~~~
cc1: some warnings being treated as errors


vim +27 drivers/clk/mstar/clk-msc313-mux.c

21
22 static u8 msc313_mux_mux_get_parent(struct clk_hw *hw)
23 {
24 struct msc313_mux *mux = mux_to_mux(hw);
25 unsigned int index;
26
> 27 regmap_field_read(mux->mux, &index);
28
29 return index;
30 }
31
32 static const struct clk_ops msc313_mux_mux_ops = {
33 .set_parent = msc313_mux_mux_set_parent,
34 .get_parent = msc313_mux_mux_get_parent,
35 };
36
37 static int msc313_mux_deglitch_enable(struct clk_hw *hw)
38 {
39 struct msc313_mux *mux = deglitch_to_mux(hw);
40
41 if (mux->gate)
42 regmap_field_write(mux->gate, 0);
43
44 return 0;
45 }
46
47 static void msc313_mux_deglitch_disable(struct clk_hw *hw)
48 {
49 struct msc313_mux *mux = deglitch_to_mux(hw);
50
51 if (mux->gate)
52 regmap_field_write(mux->gate, 1);
53 }
54
55 static int msc313_mux_deglitch_is_enabled(struct clk_hw *hw)
56 {
57 struct msc313_mux *mux = deglitch_to_mux(hw);
58 unsigned int notgated;
59
60 if (mux->gate) {
61 regmap_field_read(mux->gate, &notgated);
62 return !notgated;
63 }
64
65 return 1;
66 }
67
68 static int msc313_mux_deglitch_set_parent(struct clk_hw *hw, u8 index)
69 {
70 struct msc313_mux *mux = deglitch_to_mux(hw);
71
72 if (!mux->deglitch)
73 return -ENOTSUPP;
74
75 return regmap_field_write(mux->deglitch, index);
76 }
77
78 static u8 msc313_mux_deglitch_get_parent(struct clk_hw *hw)
79 {
80 struct msc313_mux *mux = deglitch_to_mux(hw);
81 unsigned int index = 0;
82
83 if (mux->deglitch){
84 regmap_field_read(mux->deglitch, &index);
85 }
86
87 return index;
88 }
89
90 static const struct clk_ops msc313_mux_deglitch_ops = {
91 .enable = msc313_mux_deglitch_enable,
92 .disable = msc313_mux_deglitch_disable,
93 .is_enabled = msc313_mux_deglitch_is_enabled,
94 .set_parent = msc313_mux_deglitch_set_parent,
95 .get_parent = msc313_mux_deglitch_get_parent,
96 };
97
98 struct clk_hw *msc313_mux_xlate(struct of_phandle_args *clkspec, void *data)
99 {
100 struct msc313_muxes *muxes = data;
101 unsigned int of_idx = clkspec->args[0];
102 unsigned int idx = of_idx / 2;
103
104 /* mux, deglitch, mux, deglitch,.. */
105 if (of_idx >= muxes->muxes_data->num_muxes * 2)
106 return ERR_PTR(-EINVAL);
107
108 if (of_idx % 2)
109 return &muxes->muxes[idx].deglitch_hw;
110
111 return &muxes->muxes[idx].mux_hw;
112 }
113
114 struct msc313_muxes *msc313_mux_register_muxes(struct device *dev,
115 struct regmap *regmap, const struct msc313_muxes_data *muxes_data,
116 int (*fill_clk_parent_data)(struct clk_parent_data*, void*, const void*, const struct msc313_muxes*, unsigned int, unsigned int), void *data)
117 {
118 const struct msc313_mux_data *mux_data = muxes_data->muxes;
119 struct clk_init_data mux_init = {
120 .ops = &msc313_mux_mux_ops,
121 };
122 struct clk_init_data deglitch_init = {
123 .ops = &msc313_mux_deglitch_ops,
124 };
125 struct clk_parent_data *dynamic_parent_data = NULL;
126 struct msc313_muxes *muxes;
127 struct msc313_mux *mux;
128 struct clk_hw *clk_hw;
129 int i, ret, mux_parent;
130
131 /*
132 * If using the dynamic clk_parent_data mode you have to have both
133 * a callback and data.
134 */
135 if ((fill_clk_parent_data && !data) || (!fill_clk_parent_data && data))
136 return ERR_PTR(-EINVAL);
137
138 muxes = devm_kzalloc(dev, struct_size(muxes, muxes, muxes_data->num_muxes), GFP_KERNEL);
139 if (!muxes)
140 return ERR_PTR(-ENOMEM);
141
142 muxes->muxes_data = muxes_data;
143 mux = muxes->muxes;
144
145 for (i = 0; i < muxes_data->num_muxes; i++, mux++, mux_data++) {
> 146 struct reg_field gate_field = REG_FIELD(mux_data->offset,
147 mux_data->gate_shift, mux_data->gate_shift);
> 148 struct reg_field mux_field = REG_FIELD(mux_data->offset,
149 mux_data->mux_shift, mux_data->mux_shift + (mux_data->mux_width - 1));
> 150 struct reg_field deglitch_field = REG_FIELD(mux_data->offset,
151 mux_data->deglitch_shift, mux_data->deglitch_shift);
152
153 if(!mux_data->name)
154 continue;
155
156 if (mux_data->gate_shift != -1) {
> 157 mux->gate = devm_regmap_field_alloc(dev, regmap, gate_field);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (8.79 kB)
.config.gz (16.28 kB)
Download all attachments

2021-07-19 05:19:05

by Daniel Palmer

[permalink] [raw]
Subject: Re: [linux-chenxing:mstar_v5_14_rebase_i2_drm 257/349] drivers/clk/mstar/clk-msc313-mux.c:27:2: error: implicit declaration of function 'regmap_field_read'; did you mean 'regmap_field_write'?

On Mon, 19 Jul 2021 at 03:52, kernel test robot <[email protected]> wrote:
>
> tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase_i2_drm

Is it possible to stop this bot from building branches that don't make
any sense?
This branch for example was a work branch for reverse engineering the
display hardware and has a lot of junk in it.

Cheers,

Daniel

2021-07-19 09:05:45

by Chen, Rong A

[permalink] [raw]
Subject: Re: [kbuild-all] Re: [linux-chenxing:mstar_v5_14_rebase_i2_drm 257/349] drivers/clk/mstar/clk-msc313-mux.c:27:2: error: implicit declaration of function 'regmap_field_read'; did you mean 'regmap_field_write'?



On 7/19/21 1:17 PM, Daniel Palmer wrote:
> On Mon, 19 Jul 2021 at 03:52, kernel test robot <[email protected]> wrote:
>> tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase_i2_drm
> Is it possible to stop this bot from building branches that don't make
> any sense?

Hi Daniel,

Thanks for the advice, we'll stop testing such 'rebase' branches.

Best Regards,
Rong Chen


> This branch for example was a work branch for reverse engineering the
> display hardware and has a lot of junk in it.
>
> Cheers,
>
> Daniel