[alsa-devel] [asoc:for-5.2 74/82] sound/soc/codecs/tlv320aic32x4-clk.c:287:21: error: variable 'aic32x4_codec_clkin_ops' has initializer but incomplete type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2 head: 6d56ee1550b8a81bc63c80051ff78d8d704b09ba commit: fd2df3aeafa4b4cc468d58e147e0822967034b71 [74/82] ASoC: tlv320aic32x4: Model CODEC_CLKIN in CCF config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout fd2df3aeafa4b4cc468d58e147e0822967034b71 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
sound/soc/codecs/tlv320aic32x4-clk.c:19:16: error: field 'hw' has incomplete type struct clk_hw hw; ^~ In file included from include/linux/init.h:5:0, from include/linux/io.h:22, from include/linux/clk-provider.h:9, from sound/soc/codecs/tlv320aic32x4-clk.c:10: sound/soc/codecs/tlv320aic32x4-clk.c: In function 'clk_aic32x4_pll_prepare': include/linux/kernel.h:979:32: error: dereferencing pointer to incomplete type 'struct clk_hw' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~ include/linux/compiler.h:324:9: note: in definition of macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ include/linux/compiler.h:344:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:979:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:979:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:17:29: note: in expansion of macro 'container_of' #define to_clk_aic32x4(_hw) container_of(_hw, struct clk_aic32x4, hw) ^~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:49:28: note: in expansion of macro 'to_clk_aic32x4' struct clk_aic32x4 *pll = to_clk_aic32x4(hw); ^~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c: At top level: sound/soc/codecs/tlv320aic32x4-clk.c:257:21: error: variable 'aic32x4_pll_ops' has initializer but incomplete type static const struct clk_ops aic32x4_pll_ops = { ^~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:258:3: error: 'const struct clk_ops' has no member named 'prepare' .prepare = clk_aic32x4_pll_prepare, ^~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:258:13: warning: excess elements in struct initializer .prepare = clk_aic32x4_pll_prepare, ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:258:13: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:259:3: error: 'const struct clk_ops' has no member named 'unprepare' .unprepare = clk_aic32x4_pll_unprepare, ^~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:259:15: warning: excess elements in struct initializer .unprepare = clk_aic32x4_pll_unprepare, ^~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:259:15: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:260:3: error: 'const struct clk_ops' has no member named 'is_prepared' .is_prepared = clk_aic32x4_pll_is_prepared, ^~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:260:17: warning: excess elements in struct initializer .is_prepared = clk_aic32x4_pll_is_prepared, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:260:17: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:261:3: error: 'const struct clk_ops' has no member named 'recalc_rate' .recalc_rate = clk_aic32x4_pll_recalc_rate, ^~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:261:17: warning: excess elements in struct initializer .recalc_rate = clk_aic32x4_pll_recalc_rate, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:261:17: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:262:3: error: 'const struct clk_ops' has no member named 'round_rate' .round_rate = clk_aic32x4_pll_round_rate, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:262:16: warning: excess elements in struct initializer .round_rate = clk_aic32x4_pll_round_rate, ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:262:16: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:263:3: error: 'const struct clk_ops' has no member named 'set_rate' .set_rate = clk_aic32x4_pll_set_rate, ^~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:263:14: warning: excess elements in struct initializer .set_rate = clk_aic32x4_pll_set_rate, ^~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:263:14: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:264:3: error: 'const struct clk_ops' has no member named 'set_parent' .set_parent = clk_aic32x4_pll_set_parent, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:264:16: warning: excess elements in struct initializer .set_parent = clk_aic32x4_pll_set_parent, ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:264:16: note: (near initialization for 'aic32x4_pll_ops') sound/soc/codecs/tlv320aic32x4-clk.c:265:3: error: 'const struct clk_ops' has no member named 'get_parent' .get_parent = clk_aic32x4_pll_get_parent, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:265:16: warning: excess elements in struct initializer .get_parent = clk_aic32x4_pll_get_parent, ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:265:16: note: (near initialization for 'aic32x4_pll_ops')
sound/soc/codecs/tlv320aic32x4-clk.c:287:21: error: variable 'aic32x4_codec_clkin_ops' has initializer but incomplete type
static const struct clk_ops aic32x4_codec_clkin_ops = { ^~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:288:3: error: 'const struct clk_ops' has no member named 'set_parent' .set_parent = clk_aic32x4_codec_clkin_set_parent, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:288:16: warning: excess elements in struct initializer .set_parent = clk_aic32x4_codec_clkin_set_parent, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:288:16: note: (near initialization for 'aic32x4_codec_clkin_ops') sound/soc/codecs/tlv320aic32x4-clk.c:289:3: error: 'const struct clk_ops' has no member named 'get_parent' .get_parent = clk_aic32x4_codec_clkin_get_parent, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:289:16: warning: excess elements in struct initializer .get_parent = clk_aic32x4_codec_clkin_get_parent, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:289:16: note: (near initialization for 'aic32x4_codec_clkin_ops') sound/soc/codecs/tlv320aic32x4-clk.c: In function 'aic32x4_register_clk': sound/soc/codecs/tlv320aic32x4-clk.c:314:23: error: storage size of 'init' isn't known struct clk_init_data init; ^~~~ sound/soc/codecs/tlv320aic32x4-clk.c:334:9: error: implicit declaration of function 'devm_clk_register'; did you mean 'device_register'? [-Werror=implicit-function-declaration] return devm_clk_register(dev, &priv->hw); ^~~~~~~~~~~~~~~~~ device_register sound/soc/codecs/tlv320aic32x4-clk.c:314:23: warning: unused variable 'init' [-Wunused-variable] struct clk_init_data init; ^~~~ sound/soc/codecs/tlv320aic32x4-clk.c: At top level: sound/soc/codecs/tlv320aic32x4-clk.c:257:29: error: storage size of 'aic32x4_pll_ops' isn't known static const struct clk_ops aic32x4_pll_ops = { ^~~~~~~~~~~~~~~
sound/soc/codecs/tlv320aic32x4-clk.c:287:29: error: storage size of 'aic32x4_codec_clkin_ops' isn't known
static const struct clk_ops aic32x4_codec_clkin_ops = { ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c: In function 'aic32x4_register_clk': sound/soc/codecs/tlv320aic32x4-clk.c:335:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors
vim +/aic32x4_codec_clkin_ops +287 sound/soc/codecs/tlv320aic32x4-clk.c
255 256 257 static const struct clk_ops aic32x4_pll_ops = { 258 .prepare = clk_aic32x4_pll_prepare, 259 .unprepare = clk_aic32x4_pll_unprepare, 260 .is_prepared = clk_aic32x4_pll_is_prepared, 261 .recalc_rate = clk_aic32x4_pll_recalc_rate, 262 .round_rate = clk_aic32x4_pll_round_rate, 263 .set_rate = clk_aic32x4_pll_set_rate,
264 .set_parent = clk_aic32x4_pll_set_parent,
265 .get_parent = clk_aic32x4_pll_get_parent, 266 }; 267 268 static int clk_aic32x4_codec_clkin_set_parent(struct clk_hw *hw, u8 index) 269 { 270 struct clk_aic32x4 *mux = to_clk_aic32x4(hw); 271 272 return regmap_update_bits(mux->regmap, 273 AIC32X4_CLKMUX, 274 AIC32X4_CODEC_CLKIN_MASK, index << AIC32X4_CODEC_CLKIN_SHIFT); 275 } 276 277 static u8 clk_aic32x4_codec_clkin_get_parent(struct clk_hw *hw) 278 { 279 struct clk_aic32x4 *mux = to_clk_aic32x4(hw); 280 unsigned int val; 281 282 regmap_read(mux->regmap, AIC32X4_CLKMUX, &val); 283 284 return (val & AIC32X4_CODEC_CLKIN_MASK) >> AIC32X4_CODEC_CLKIN_SHIFT; 285 } 286
287 static const struct clk_ops aic32x4_codec_clkin_ops = {
288 .set_parent = clk_aic32x4_codec_clkin_set_parent, 289 .get_parent = clk_aic32x4_codec_clkin_get_parent, 290 }; 291 292 static struct aic32x4_clkdesc aic32x4_clkdesc_array[] = { 293 { 294 .name = "pll", 295 .parent_names = 296 (const char* []) { "mclk", "bclk", "gpio", "din" }, 297 .num_parents = 4, 298 .ops = &aic32x4_pll_ops, 299 .reg = 0, 300 }, 301 { 302 .name = "codec_clkin", 303 .parent_names = 304 (const char *[]) { "mclk", "bclk", "gpio", "pll" }, 305 .num_parents = 4, 306 .ops = &aic32x4_codec_clkin_ops, 307 .reg = 0, 308 }, 309 }; 310 311 static struct clk *aic32x4_register_clk(struct device *dev, 312 struct aic32x4_clkdesc *desc) 313 {
314 struct clk_init_data init;
315 struct clk_aic32x4 *priv; 316 const char *devname = dev_name(dev); 317 318 init.ops = desc->ops; 319 init.name = desc->name; 320 init.parent_names = desc->parent_names; 321 init.num_parents = desc->num_parents; 322 init.flags = 0; 323 324 priv = devm_kzalloc(dev, sizeof(struct clk_aic32x4), GFP_KERNEL); 325 if (priv == NULL) 326 return (struct clk *) -ENOMEM; 327 328 priv->dev = dev; 329 priv->hw.init = &init; 330 priv->regmap = dev_get_regmap(dev, NULL); 331 priv->reg = desc->reg; 332 333 clk_hw_register_clkdev(&priv->hw, desc->name, devname); 334 return devm_clk_register(dev, &priv->hw); 335 } 336
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
participants (1)
-
kbuild test robot