From: kernel test robot <lkp@intel.com>
To: Herve Codina <herve.codina@bootlin.com>,
Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v6 6/7] ASoC: codecs: Add support for the Lantiq PEF2256 codec
Date: Sat, 22 Apr 2023 12:18:02 +0800 [thread overview]
Message-ID: <202304221213.LXOnsKtj-lkp@intel.com> (raw)
In-Reply-To: <20230417171601.74656-7-herve.codina@bootlin.com>
Hi Herve,
kernel test robot noticed the following build warnings:
[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on linusw-pinctrl/devel linusw-pinctrl/for-next broonie-sound/for-next linus/master v6.3-rc7 next-20230421]
[cannot apply to lee-mfd/for-mfd-fixes]
[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/Herve-Codina/dt-bindings-mfd-Add-the-Lantiq-PEF2256-E1-T1-J1-framer/20230418-011757
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link: https://lore.kernel.org/r/20230417171601.74656-7-herve.codina%40bootlin.com
patch subject: [PATCH v6 6/7] ASoC: codecs: Add support for the Lantiq PEF2256 codec
config: loongarch-randconfig-s051-20230421 (https://download.01.org/0day-ci/archive/20230422/202304221213.LXOnsKtj-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/1b22af56c892af6c0b5f6f18eff40f1fbefcb699
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Herve-Codina/dt-bindings-mfd-Add-the-Lantiq-PEF2256-E1-T1-J1-framer/20230418-011757
git checkout 1b22af56c892af6c0b5f6f18eff40f1fbefcb699
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304221213.LXOnsKtj-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/pef2256-codec.c:137:26: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/soc/codecs/pef2256-codec.c:139:59: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted snd_pcm_format_t [usertype] format @@ got unsigned int [assigned] i @@
sound/soc/codecs/pef2256-codec.c:139:59: sparse: expected restricted snd_pcm_format_t [usertype] format
sound/soc/codecs/pef2256-codec.c:139:59: sparse: got unsigned int [assigned] i
sound/soc/codecs/pef2256-codec.c:177:26: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/soc/codecs/pef2256-codec.c:179:62: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted snd_pcm_format_t [usertype] format @@ got int [assigned] i @@
sound/soc/codecs/pef2256-codec.c:179:62: sparse: expected restricted snd_pcm_format_t [usertype] format
sound/soc/codecs/pef2256-codec.c:179:62: sparse: got int [assigned] i
vim +137 sound/soc/codecs/pef2256-codec.c
118
119 static int pef2256_dai_hw_rule_format_by_channels(struct snd_soc_dai *dai,
120 struct snd_pcm_hw_params *params,
121 unsigned int nb_ts)
122 {
123 struct snd_mask *f_old = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
124 unsigned int channels = params_channels(params);
125 unsigned int slot_width;
126 struct snd_mask f_new;
127 unsigned int i;
128
129 if (!channels || channels > nb_ts) {
130 dev_err(dai->dev, "channels %u not supported\n", nb_ts);
131 return -EINVAL;
132 }
133
134 slot_width = (nb_ts / channels) * 8;
135
136 snd_mask_none(&f_new);
> 137 for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
138 if (snd_mask_test(f_old, i)) {
> 139 if (snd_pcm_format_physical_width(i) <= slot_width)
140 snd_mask_set(&f_new, i);
141 }
142 }
143
144 return snd_mask_refine(f_old, &f_new);
145 }
146
147 static int pef2256_dai_hw_rule_playback_format_by_channels(struct snd_pcm_hw_params *params,
148 struct snd_pcm_hw_rule *rule)
149 {
150 struct snd_soc_dai *dai = rule->private;
151 struct pef2256_codec *pef2256 = snd_soc_component_get_drvdata(dai->component);
152
153 return pef2256_dai_hw_rule_format_by_channels(dai, params, pef2256->max_chan_playback);
154 }
155
156 static int pef2256_dai_hw_rule_capture_format_by_channels(struct snd_pcm_hw_params *params,
157 struct snd_pcm_hw_rule *rule)
158 {
159 struct snd_soc_dai *dai = rule->private;
160 struct pef2256_codec *pef2256 = snd_soc_component_get_drvdata(dai->component);
161
162 return pef2256_dai_hw_rule_format_by_channels(dai, params, pef2256->max_chan_capture);
163 }
164
165 static u64 pef2256_formats(u8 nb_ts)
166 {
167 u64 formats;
168 unsigned int chan_width;
169 unsigned int format_width;
170 int i;
171
172 if (!nb_ts)
173 return 0;
174
175 formats = 0;
176 chan_width = nb_ts * 8;
177 for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
178 /* Support physical width multiple of 8bit */
> 179 format_width = snd_pcm_format_physical_width(i);
180 if (format_width == 0 || format_width % 8)
181 continue;
182
183 /*
184 * And support physical width that can fit N times in the
185 * channel
186 */
187 if (format_width > chan_width || chan_width % format_width)
188 continue;
189
190 formats |= (1ULL << i);
191 }
192 return formats;
193 }
194
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-22 4:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 17:15 [PATCH v6 0/7] Add the Lantiq PEF2256 audio support Herve Codina
2023-04-17 17:15 ` [PATCH v6 1/7] dt-bindings: mfd: Add the Lantiq PEF2256 E1/T1/J1 framer Herve Codina
2023-04-17 17:15 ` [PATCH v6 2/7] mfd: core: Ensure disabled devices are skiped without aborting Herve Codina
2023-04-20 12:29 ` Lee Jones
2023-04-20 12:52 ` Herve Codina
2023-04-17 17:15 ` [PATCH v6 3/7] mfd: Add support for the Lantiq PEF2256 framer Herve Codina
2023-04-20 12:39 ` Lee Jones
2023-04-20 13:15 ` Herve Codina
2023-04-20 13:47 ` Lee Jones
2023-04-21 7:26 ` Herve Codina
2023-04-21 7:45 ` Lee Jones
2023-04-21 7:52 ` Krzysztof Kozlowski
2023-04-24 9:52 ` Lee Jones
2023-04-24 14:11 ` Krzysztof Kozlowski
2023-04-17 17:15 ` [PATCH v6 4/7] Documentation: sysfs: Document the Lantiq PEF2256 sysfs entry Herve Codina
2023-04-17 17:15 ` [PATCH v6 5/7] pinctrl: Add support for the Lantic PEF2256 pinmux Herve Codina
2023-04-17 17:16 ` [PATCH v6 6/7] ASoC: codecs: Add support for the Lantiq PEF2256 codec Herve Codina
2023-04-22 4:18 ` kernel test robot [this message]
2023-04-17 17:16 ` [PATCH v6 7/7] MAINTAINERS: Add the Lantiq PEF2256 driver entry Herve Codina
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=202304221213.LXOnsKtj-lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=devicetree@vger.kernel.org \
--cc=herve.codina@bootlin.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tiwai@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).