[morimoto:sound-2022-06-30-v3 11/19] sound/soc/codecs/cs4271.c:359:64: error: too few arguments to function call, expected 3, have 2

From: kernel test robot
Date: Thu Jun 30 2022 - 04:34:45 EST


tree: https://github.com/morimoto/linux sound-2022-06-30-v3
head: fc6f65d23a318462b8e17cdf7db622dfc7719ac7
commit: 13230e877cbc275ad58da98eca3f64ae9775afb9 [11/19] ASoC: count activity via TX/RX base instead of Playback/Capture.
config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20220630/202206301643.dem6nEiG-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a774ba7f60d1fef403b5507b1b1a7475d3684d71)
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/morimoto/linux/commit/13230e877cbc275ad58da98eca3f64ae9775afb9
git remote add morimoto https://github.com/morimoto/linux
git fetch --no-tags morimoto sound-2022-06-30-v3
git checkout 13230e877cbc275ad58da98eca3f64ae9775afb9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> sound/soc/codecs/cs4271.c:359:64: error: too few arguments to function call, expected 3, have 2
!snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_CAPTURE)) ||
~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/sound/soc-dai.h:606:1: note: 'snd_soc_dai_stream_active' declared here
snd_soc_dai_stream_active(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai, int stream)
^
sound/soc/codecs/cs4271.c:361:65: error: too few arguments to function call, expected 3, have 2
!snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_PLAYBACK))) {
~~~~~~~~~~~~~~~~~~~~~~~~~ ^
include/sound/soc-dai.h:606:1: note: 'snd_soc_dai_stream_active' declared here
snd_soc_dai_stream_active(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai, int stream)
^
2 errors generated.


vim +359 sound/soc/codecs/cs4271.c

5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 338
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 339 static int cs4271_hw_params(struct snd_pcm_substream *substream,
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 340 struct snd_pcm_hw_params *params,
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 341 struct snd_soc_dai *dai)
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 342 {
cac308fcd767a07 Kuninori Morimoto 2018-01-29 343 struct snd_soc_component *component = dai->component;
cac308fcd767a07 Kuninori Morimoto 2018-01-29 344 struct cs4271_private *cs4271 = snd_soc_component_get_drvdata(component);
0d42e6e77f8b872 Alexander Sverdlin 2011-01-21 345 int i, ret;
0d42e6e77f8b872 Alexander Sverdlin 2011-01-21 346 unsigned int ratio, val;
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 347
fd23fb9f6bfd43a Daniel Mack 2012-12-10 348 if (cs4271->enable_soft_reset) {
fd23fb9f6bfd43a Daniel Mack 2012-12-10 349 /*
fd23fb9f6bfd43a Daniel Mack 2012-12-10 350 * Put the codec in soft reset and back again in case it's not
fd23fb9f6bfd43a Daniel Mack 2012-12-10 351 * currently streaming data. This way of bringing the codec in
fd23fb9f6bfd43a Daniel Mack 2012-12-10 352 * sync to the current clocks is not explicitly documented in
fd23fb9f6bfd43a Daniel Mack 2012-12-10 353 * the data sheet, but it seems to work fine, and in contrast
fd23fb9f6bfd43a Daniel Mack 2012-12-10 354 * to a read hardware reset, we don't have to sync back all
fd23fb9f6bfd43a Daniel Mack 2012-12-10 355 * registers every time.
fd23fb9f6bfd43a Daniel Mack 2012-12-10 356 */
fd23fb9f6bfd43a Daniel Mack 2012-12-10 357
fd23fb9f6bfd43a Daniel Mack 2012-12-10 358 if ((substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
5e518eddd11e8f7 Kuninori Morimoto 2020-05-15 @359 !snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_CAPTURE)) ||
fd23fb9f6bfd43a Daniel Mack 2012-12-10 360 (substream->stream == SNDRV_PCM_STREAM_CAPTURE &&
5e518eddd11e8f7 Kuninori Morimoto 2020-05-15 361 !snd_soc_dai_stream_active(dai, SNDRV_PCM_STREAM_PLAYBACK))) {
1b1861ead4f9fd7 Daniel Mack 2013-03-07 362 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2,
fd23fb9f6bfd43a Daniel Mack 2012-12-10 363 CS4271_MODE2_PDN,
fd23fb9f6bfd43a Daniel Mack 2012-12-10 364 CS4271_MODE2_PDN);
fd23fb9f6bfd43a Daniel Mack 2012-12-10 365 if (ret < 0)
fd23fb9f6bfd43a Daniel Mack 2012-12-10 366 return ret;
fd23fb9f6bfd43a Daniel Mack 2012-12-10 367
1b1861ead4f9fd7 Daniel Mack 2013-03-07 368 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2,
fd23fb9f6bfd43a Daniel Mack 2012-12-10 369 CS4271_MODE2_PDN, 0);
fd23fb9f6bfd43a Daniel Mack 2012-12-10 370 if (ret < 0)
fd23fb9f6bfd43a Daniel Mack 2012-12-10 371 return ret;
fd23fb9f6bfd43a Daniel Mack 2012-12-10 372 }
fd23fb9f6bfd43a Daniel Mack 2012-12-10 373 }
fd23fb9f6bfd43a Daniel Mack 2012-12-10 374
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 375 cs4271->rate = params_rate(params);
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 376
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 377 /* Configure DAC */
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 378 if (cs4271->rate < 50000)
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 379 val = CS4271_MODE1_MODE_1X;
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 380 else if (cs4271->rate < 100000)
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 381 val = CS4271_MODE1_MODE_2X;
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 382 else
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 383 val = CS4271_MODE1_MODE_4X;
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 384
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 385 ratio = cs4271->mclk / cs4271->rate;
0c03e37af47efcb Christophe JAILLET 2019-07-24 386 for (i = 0; i < CS4271_NR_RATIOS; i++)
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 387 if ((cs4271_clk_tab[i].master == cs4271->master) &&
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 388 (cs4271_clk_tab[i].speed_mode == val) &&
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 389 (cs4271_clk_tab[i].ratio == ratio))
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 390 break;
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 391
0c03e37af47efcb Christophe JAILLET 2019-07-24 392 if (i == CS4271_NR_RATIOS) {
cac308fcd767a07 Kuninori Morimoto 2018-01-29 393 dev_err(component->dev, "Invalid sample rate\n");
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 394 return -EINVAL;
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 395 }
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 396
5c3a12e96c9f315 Alexander Sverdlin 2011-03-07 397 val |= cs4271_clk_tab[i].ratio_mask;
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 398
1b1861ead4f9fd7 Daniel Mack 2013-03-07 399 ret = regmap_update_bits(cs4271->regmap, CS4271_MODE1,
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 400 CS4271_MODE1_MODE_MASK | CS4271_MODE1_DIV_MASK, val);
0d42e6e77f8b872 Alexander Sverdlin 2011-01-21 401 if (ret < 0)
0d42e6e77f8b872 Alexander Sverdlin 2011-01-21 402 return ret;
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 403
cac308fcd767a07 Kuninori Morimoto 2018-01-29 404 return cs4271_set_deemph(component);
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 405 }
67b22517d8e48a9 Alexander Sverdlin 2011-01-19 406

:::::: The code at line 359 was first introduced by commit
:::::: 5e518eddd11e8f71aaffc954dc7ee9572fc59808 ASoC: codecs: use snd_soc_xxx_active()

:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp