Re: [PATCH v3 2/7] soundwire: intel: Allow for dynamic assignment of PDIs
From: kernel test robot
Date: Fri Nov 06 2026 - 15:01:07 EST
Hi Cezary,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on tiwai-sound/for-next tiwai-sound/for-linus linus/master v7.4-rc1 next-20261105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Cezary-Rojewski/soundwire-intel-Define-stubs-when-library-is-disabled/20261106-131551
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20261106121557.2338556-3-cezary.rojewski%40intel.com
patch subject: [PATCH v3 2/7] soundwire: intel: Allow for dynamic assignment of PDIs
config: x86_64-randconfig-1015-20261106 (https://download.01.org/0day-ci/archive/20261107/202611070307.UuD8O6zR-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261107/202611070307.UuD8O6zR-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611070307.UuD8O6zR-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/soundwire/intel.c: In function 'intel_prepare':
>> drivers/soundwire/intel.c:807:17: warning: variable 'dir' set but not used [-Wunused-but-set-variable]
807 | int ch, dir;
| ^~~
>> drivers/soundwire/intel.c:807:13: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
807 | int ch, dir;
| ^~
vim +/dir +807 drivers/soundwire/intel.c
c46302ec554c57 Vinod Koul 2018-04-26 800
27b198f409d876 Rander Wang 2020-02-14 801 static int intel_prepare(struct snd_pcm_substream *substream,
27b198f409d876 Rander Wang 2020-02-14 802 struct snd_soc_dai *dai)
27b198f409d876 Rander Wang 2020-02-14 803 {
a5a0239c27fe11 Bard Liao 2020-08-17 804 struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai);
a5a0239c27fe11 Bard Liao 2020-08-17 805 struct sdw_intel *sdw = cdns_to_intel(cdns);
e0767e39107968 Pierre-Louis Bossart 2022-11-01 806 struct sdw_cdns_dai_runtime *dai_runtime;
a5a0239c27fe11 Bard Liao 2020-08-17 @807 int ch, dir;
244eb888f9ab86 Pierre-Louis Bossart 2020-09-04 808 int ret = 0;
27b198f409d876 Rander Wang 2020-02-14 809
7dddead766c082 Pierre-Louis Bossart 2022-11-01 810 dai_runtime = cdns->dai_runtime_array[dai->id];
e0767e39107968 Pierre-Louis Bossart 2022-11-01 811 if (!dai_runtime) {
e0767e39107968 Pierre-Louis Bossart 2022-11-01 812 dev_err(dai->dev, "failed to get dai runtime in %s\n",
27b198f409d876 Rander Wang 2020-02-14 813 __func__);
27b198f409d876 Rander Wang 2020-02-14 814 return -EIO;
27b198f409d876 Rander Wang 2020-02-14 815 }
27b198f409d876 Rander Wang 2020-02-14 816
e0767e39107968 Pierre-Louis Bossart 2022-11-01 817 if (dai_runtime->suspended) {
50cd92e0c8d35d Kuninori Morimoto 2023-09-11 818 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 819 struct snd_pcm_hw_params *hw_params;
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 820
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 821 hw_params = &rtd->dpcm[substream->stream].hw_params;
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 822
e0767e39107968 Pierre-Louis Bossart 2022-11-01 823 dai_runtime->suspended = false;
a5a0239c27fe11 Bard Liao 2020-08-17 824
a5a0239c27fe11 Bard Liao 2020-08-17 825 /*
a5a0239c27fe11 Bard Liao 2020-08-17 826 * .prepare() is called after system resume, where we
a5a0239c27fe11 Bard Liao 2020-08-17 827 * need to reinitialize the SHIM/ALH/Cadence IP.
a5a0239c27fe11 Bard Liao 2020-08-17 828 * .prepare() is also called to deal with underflows,
a5a0239c27fe11 Bard Liao 2020-08-17 829 * but in those cases we cannot touch ALH/SHIM
a5a0239c27fe11 Bard Liao 2020-08-17 830 * registers
a5a0239c27fe11 Bard Liao 2020-08-17 831 */
a5a0239c27fe11 Bard Liao 2020-08-17 832
a5a0239c27fe11 Bard Liao 2020-08-17 833 /* configure stream */
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 834 ch = params_channels(hw_params);
a5a0239c27fe11 Bard Liao 2020-08-17 835 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
a5a0239c27fe11 Bard Liao 2020-08-17 836 dir = SDW_DATA_DIR_RX;
a5a0239c27fe11 Bard Liao 2020-08-17 837 else
a5a0239c27fe11 Bard Liao 2020-08-17 838 dir = SDW_DATA_DIR_TX;
a5a0239c27fe11 Bard Liao 2020-08-17 839
5977f02f8733d2 Cezary Rojewski 2026-11-06 840 sdw_intel_pdi_config(&cdns->bus, dai_runtime->pdi);
a5a0239c27fe11 Bard Liao 2020-08-17 841
a5a0239c27fe11 Bard Liao 2020-08-17 842 /* Inform DSP about PDI stream number */
1d905d355ef329 Pierre-Louis Bossart 2023-05-15 843 ret = intel_params_stream(sdw, substream, dai,
0a0d1740bd8fd7 Pierre-Louis Bossart 2023-03-21 844 hw_params,
a5a0239c27fe11 Bard Liao 2020-08-17 845 sdw->instance,
e0767e39107968 Pierre-Louis Bossart 2022-11-01 846 dai_runtime->pdi->intel_alh_id);
a5a0239c27fe11 Bard Liao 2020-08-17 847 }
a5a0239c27fe11 Bard Liao 2020-08-17 848
a5a0239c27fe11 Bard Liao 2020-08-17 849 return ret;
27b198f409d876 Rander Wang 2020-02-14 850 }
27b198f409d876 Rander Wang 2020-02-14 851
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki