All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code.
Date: Mon, 08 Feb 2021 10:59:26 +0800	[thread overview]
Message-ID: <202102081022.3GEdVReM-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-02-08  2:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  2:59 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-03  1:40 sound/soc/intel/boards/kbl_rt5663_max98927.c:410 kabylake_ssp_fixup() warn: ignoring unreachable code kernel test robot
2021-03-25 18:03 kernel test robot
2021-01-12 14:27 kernel test robot
2020-12-22 21:46 kernel test robot
2020-12-21 12:32 kernel test robot
2020-12-21 12:30 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102081022.3GEdVReM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.