All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2020-12-21 12:30 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-12-21 12:30 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6057 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e37b12e4bb21e7c81732370b0a2b34bd196f380b
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   10 weeks ago
:::::: branch date: 15 hours ago
:::::: commit date: 10 weeks ago
config: x86_64-randconfig-m001-20201221 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef64782 Naveen M             2017-05-15  395  
ec040dd5ef64782 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef64782 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef64782 Naveen M             2017-05-15  398  {
ec040dd5ef64782 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef64782 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef64782 Naveen M             2017-05-15  431  
e78407fb7ed38fd Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38fd Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef64782 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef64782 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fdb Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38fd Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38fd Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38fd Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38fd Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fdb Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef64782 Naveen M             2017-05-15  449  
ec040dd5ef64782 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef64782 Naveen M             2017-05-15  451  }
ec040dd5ef64782 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31761 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2021-06-03  1:40 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-03  1:40 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5996 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   324c92e5e0ee0e993bdb106fac407846ed677f6b
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   8 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 8 months ago
config: i386-randconfig-m021-20210603 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef6478 Naveen M             2017-05-15  395  
ec040dd5ef6478 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef6478 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef6478 Naveen M             2017-05-15  398  {
ec040dd5ef6478 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef6478 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607 Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef6478 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef6478 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef6478 Naveen M             2017-05-15  431  
e78407fb7ed38f Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38f Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38f Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef6478 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607 Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef6478 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fd Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38f Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38f Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38f Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38f Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38f Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fd Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef6478 Naveen M             2017-05-15  449  
ec040dd5ef6478 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef6478 Naveen M             2017-05-15  451  }
ec040dd5ef6478 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42657 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2021-03-25 18:03 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-03-25 18:03 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6057 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e138138003eb3b3d06cc91cf2e8c5dec77e2a31e
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   5 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 5 months ago
config: x86_64-randconfig-m031-20210325 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef64782 Naveen M             2017-05-15  395  
ec040dd5ef64782 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef64782 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef64782 Naveen M             2017-05-15  398  {
ec040dd5ef64782 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef64782 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef64782 Naveen M             2017-05-15  431  
e78407fb7ed38fd Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38fd Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef64782 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef64782 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fdb Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38fd Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38fd Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38fd Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38fd Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fdb Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef64782 Naveen M             2017-05-15  449  
ec040dd5ef64782 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef64782 Naveen M             2017-05-15  451  }
ec040dd5ef64782 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35960 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2021-02-08  2:59 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-02-08  2:59 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5997 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   61556703b610a104de324e4f061dc6cf7b218b46
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   4 months ago
:::::: branch date: 4 days ago
:::::: commit date: 4 months ago
config: x86_64-randconfig-m001-20210208 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef6478 Naveen M             2017-05-15  395  
ec040dd5ef6478 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef6478 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef6478 Naveen M             2017-05-15  398  {
ec040dd5ef6478 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef6478 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607 Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef6478 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef6478 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef6478 Naveen M             2017-05-15  431  
e78407fb7ed38f Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38f Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38f Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef6478 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607 Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef6478 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fd Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38f Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38f Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38f Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38f Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38f Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fd Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef6478 Naveen M             2017-05-15  449  
ec040dd5ef6478 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef6478 Naveen M             2017-05-15  451  }
ec040dd5ef6478 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39138 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2021-01-12 14:27 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-01-12 14:27 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6115 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a0d54b4f5b219fb31f0776e9f53aa137e78ae431
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   3 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-m001-20210112 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef647822 Naveen M             2017-05-15  395  
ec040dd5ef647822 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef647822 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef647822 Naveen M             2017-05-15  398  {
ec040dd5ef647822 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef647822 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607ec Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef647822 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef647822 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a62 Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef647822 Naveen M             2017-05-15  431  
e78407fb7ed38fde Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38fde Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38fde Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef647822 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607ec Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef647822 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fdb6 Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38fde Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38fde Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38fde Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38fde Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38fde Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a62 Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fdb6 Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef647822 Naveen M             2017-05-15  449  
ec040dd5ef647822 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef647822 Naveen M             2017-05-15  451  }
ec040dd5ef647822 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39445 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2020-12-22 21:46 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-12-22 21:46 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6057 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8653b778e454a7708847aeafe689bce07aeeb94e
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   10 weeks ago
:::::: branch date: 27 hours ago
:::::: commit date: 10 weeks ago
config: x86_64-randconfig-m001-20201221 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef64782 Naveen M             2017-05-15  395  
ec040dd5ef64782 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef64782 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef64782 Naveen M             2017-05-15  398  {
ec040dd5ef64782 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef64782 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef64782 Naveen M             2017-05-15  431  
e78407fb7ed38fd Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38fd Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef64782 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef64782 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fdb Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38fd Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38fd Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38fd Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38fd Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fdb Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef64782 Naveen M             2017-05-15  449  
ec040dd5ef64782 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef64782 Naveen M             2017-05-15  451  }
ec040dd5ef64782 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31761 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
@ 2020-12-21 12:32 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-12-21 12:32 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6057 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Tomasz Figa <tfiga@chromium.org>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e37b12e4bb21e7c81732370b0a2b34bd196f380b
commit: 9fe9efd6924c9a62ebb759025bb8927e398f51f7 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function
date:   10 weeks ago
:::::: branch date: 15 hours ago
:::::: commit date: 10 weeks ago
config: x86_64-randconfig-m001-20201221 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.

Old smatch warnings:
sound/soc/intel/boards/kbl_rt5663_max98927.c:419 kabylake_ssp_fixup() warn: ignoring unreachable code.

vim +410 sound/soc/intel/boards/kbl_rt5663_max98927.c

ec040dd5ef64782 Naveen M             2017-05-15  395  
ec040dd5ef64782 Naveen M             2017-05-15  396  static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
ec040dd5ef64782 Naveen M             2017-05-15  397  	struct snd_pcm_hw_params *params)
ec040dd5ef64782 Naveen M             2017-05-15  398  {
ec040dd5ef64782 Naveen M             2017-05-15  399  	struct snd_interval *rate = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  400  			SNDRV_PCM_HW_PARAM_RATE);
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  401  	struct snd_interval *chan = hw_param_interval(params,
ec040dd5ef64782 Naveen M             2017-05-15  402  			SNDRV_PCM_HW_PARAM_CHANNELS);
ec040dd5ef64782 Naveen M             2017-05-15  403  	struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  404  	struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  405  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  406  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  407  	 * The following loop will be called only for playback stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  408  	 * In this platform, there is only one playback device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  409  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14 @410  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  411  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  412  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  413  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  414  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  415  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  416  	 * This following loop will be called only for capture stream
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  417  	 * In this platform, there is only one capture device on every SSP
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  418  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  419  	for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) {
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  420  		rtd_dpcm = dpcm;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  421  		break;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  422  	}
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  423  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  424  	if (!rtd_dpcm)
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  425  		return -EINVAL;
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  426  
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  427  	/*
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  428  	 * The above 2 loops are mutually exclusive based on the stream direction,
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  429  	 * thus rtd_dpcm variable will never be overwritten
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  430  	 */
ec040dd5ef64782 Naveen M             2017-05-15  431  
e78407fb7ed38fd Harsha Priya N       2017-10-26  432  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  433  	 * The ADSP will convert the FE rate to 48k, stereo, 24 bit
e78407fb7ed38fd Harsha Priya N       2017-10-26  434  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  435  	if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  436  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") ||
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  437  	    !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) {
ec040dd5ef64782 Naveen M             2017-05-15  438  		rate->min = rate->max = 48000;
13a5d5edcf0607e Pierre-Louis Bossart 2020-01-13  439  		chan->min = chan->max = 2;
ec040dd5ef64782 Naveen M             2017-05-15  440  		snd_mask_none(fmt);
b5453e8ca311fdb Takashi Iwai         2018-07-25  441  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
e78407fb7ed38fd Harsha Priya N       2017-10-26  442  	}
e78407fb7ed38fd Harsha Priya N       2017-10-26  443  	/*
e78407fb7ed38fd Harsha Priya N       2017-10-26  444  	 * The speaker on the SSP0 supports S16_LE and not S24_LE.
e78407fb7ed38fd Harsha Priya N       2017-10-26  445  	 * thus changing the mask here
e78407fb7ed38fd Harsha Priya N       2017-10-26  446  	 */
9fe9efd6924c9a6 Tomasz Figa          2020-10-14  447  	if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec"))
b5453e8ca311fdb Takashi Iwai         2018-07-25  448  		snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
ec040dd5ef64782 Naveen M             2017-05-15  449  
ec040dd5ef64782 Naveen M             2017-05-15  450  	return 0;
ec040dd5ef64782 Naveen M             2017-05-15  451  }
ec040dd5ef64782 Naveen M             2017-05-15  452  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31761 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-03  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 12:30 sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code kernel test robot
2020-12-21 12:32 kernel test robot
2020-12-22 21:46 kernel test robot
2021-01-12 14:27 kernel test robot
2021-02-08  2:59 kernel test robot
2021-03-25 18:03 kernel test robot
2021-06-03  1:40 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.