[alsa-devel] [asoc:for-5.2 75/82] sound/soc/codecs/tlv320aic32x4-clk.c:346:21: error: variable 'aic32x4_div_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: a51b50062091619915c5155085bbe13a7aca6903 [75/82] ASoC: tlv320aic32x4: Model DAC/ADC dividers 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 a51b50062091619915c5155085bbe13a7aca6903 # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
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:346:21: error: variable 'aic32x4_div_ops' has initializer but incomplete type
static const struct clk_ops aic32x4_div_ops = { ^~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:347:3: error: 'const struct clk_ops' has no member named 'prepare' .prepare = clk_aic32x4_div_prepare, ^~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:347:13: warning: excess elements in struct initializer .prepare = clk_aic32x4_div_prepare, ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:347:13: note: (near initialization for 'aic32x4_div_ops') sound/soc/codecs/tlv320aic32x4-clk.c:348:3: error: 'const struct clk_ops' has no member named 'unprepare' .unprepare = clk_aic32x4_div_unprepare, ^~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:348:15: warning: excess elements in struct initializer .unprepare = clk_aic32x4_div_unprepare, ^~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:348:15: note: (near initialization for 'aic32x4_div_ops') sound/soc/codecs/tlv320aic32x4-clk.c:349:3: error: 'const struct clk_ops' has no member named 'set_rate' .set_rate = clk_aic32x4_div_set_rate, ^~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:349:14: warning: excess elements in struct initializer .set_rate = clk_aic32x4_div_set_rate, ^~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:349:14: note: (near initialization for 'aic32x4_div_ops') sound/soc/codecs/tlv320aic32x4-clk.c:350:3: error: 'const struct clk_ops' has no member named 'round_rate' .round_rate = clk_aic32x4_div_round_rate, ^~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:350:16: warning: excess elements in struct initializer .round_rate = clk_aic32x4_div_round_rate, ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:350:16: note: (near initialization for 'aic32x4_div_ops') sound/soc/codecs/tlv320aic32x4-clk.c:351:3: error: 'const struct clk_ops' has no member named 'recalc_rate' .recalc_rate = clk_aic32x4_div_recalc_rate, ^~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:351:17: warning: excess elements in struct initializer .recalc_rate = clk_aic32x4_div_recalc_rate, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c:351:17: note: (near initialization for 'aic32x4_div_ops') sound/soc/codecs/tlv320aic32x4-clk.c: In function 'aic32x4_register_clk': sound/soc/codecs/tlv320aic32x4-clk.c:404:23: error: storage size of 'init' isn't known struct clk_init_data init; ^~~~ sound/soc/codecs/tlv320aic32x4-clk.c:424: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:404: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:346:29: error: storage size of 'aic32x4_div_ops' isn't known
static const struct clk_ops aic32x4_div_ops = { ^~~~~~~~~~~~~~~ sound/soc/codecs/tlv320aic32x4-clk.c: In function 'aic32x4_register_clk': sound/soc/codecs/tlv320aic32x4-clk.c:425:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors
vim +/aic32x4_div_ops +346 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 int clk_aic32x4_div_prepare(struct clk_hw *hw) 293 { 294 struct clk_aic32x4 *div = to_clk_aic32x4(hw); 295 296 return regmap_update_bits(div->regmap, div->reg, 297 AIC32X4_DIVEN, AIC32X4_DIVEN); 298 } 299 300 static void clk_aic32x4_div_unprepare(struct clk_hw *hw) 301 { 302 struct clk_aic32x4 *div = to_clk_aic32x4(hw); 303 304 regmap_update_bits(div->regmap, div->reg, 305 AIC32X4_DIVEN, 0); 306 } 307 308 static int clk_aic32x4_div_set_rate(struct clk_hw *hw, unsigned long rate, 309 unsigned long parent_rate) 310 { 311 struct clk_aic32x4 *div = to_clk_aic32x4(hw); 312 u8 divisor; 313 314 divisor = DIV_ROUND_UP(parent_rate, rate); 315 if (divisor > 128) 316 return -EINVAL; 317 318 return regmap_update_bits(div->regmap, div->reg, 319 AIC32X4_DIV_MASK, divisor); 320 } 321 322 static long clk_aic32x4_div_round_rate(struct clk_hw *hw, unsigned long rate, 323 unsigned long *parent_rate) 324 { 325 unsigned long divisor; 326 327 divisor = DIV_ROUND_UP(*parent_rate, rate); 328 if (divisor > 128) 329 return -EINVAL; 330 331 return DIV_ROUND_UP(*parent_rate, divisor); 332 } 333 334 static unsigned long clk_aic32x4_div_recalc_rate(struct clk_hw *hw, 335 unsigned long parent_rate) 336 { 337 struct clk_aic32x4 *div = to_clk_aic32x4(hw); 338 339 unsigned int val; 340 341 regmap_read(div->regmap, div->reg, &val); 342 343 return DIV_ROUND_UP(parent_rate, val & AIC32X4_DIV_MASK); 344 } 345
346 static const struct clk_ops aic32x4_div_ops = {
347 .prepare = clk_aic32x4_div_prepare, 348 .unprepare = clk_aic32x4_div_unprepare, 349 .set_rate = clk_aic32x4_div_set_rate, 350 .round_rate = clk_aic32x4_div_round_rate, 351 .recalc_rate = clk_aic32x4_div_recalc_rate, 352 }; 353
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
participants (1)
-
kbuild test robot