From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, llvm@lists.linux.dev
Subject: [linux-next:master 1489/1780] sound/core/pcm_drm_eld.c:318:42: warning: arithmetic between different enumeration types ('enum cea_audio_coding_types' and 'enum cea_audio_coding_xtypes')
Date: Thu, 6 Feb 2025 17:55:48 +0800 [thread overview]
Message-ID: <202502061718.xOBwKElT-lkp@intel.com> (raw)
TO: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
CC: Takashi Iwai <tiwai@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 808eb958781e4ebb6e9c0962af2e856767e20f45
commit: 1b0e9d7f76c9bb6bd1a345ef033ae7fe5e77649c [1489/1780] ALSA: hda/hdmi: extract common interface for ELD handling
config: i386-buildonly-randconfig-004-20250206 (https://download.01.org/0day-ci/archive/20250206/202502061718.xOBwKElT-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250206/202502061718.xOBwKElT-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502061718.xOBwKElT-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/core/pcm_drm_eld.c:318:42: warning: arithmetic between different enumeration types ('enum cea_audio_coding_types' and 'enum cea_audio_coding_xtypes') [-Wenum-enum-conversion]
318 | a->format += AUDIO_CODING_TYPE_HE_AAC -
| ~~~~~~~~~~~~~~~~~~~~~~~~ ^
319 | AUDIO_CODING_XTYPE_HE_AAC;
| ~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +318 sound/core/pcm_drm_eld.c
246
247 static void hdmi_update_short_audio_desc(struct device *dev,
248 struct snd_cea_sad *a,
249 const unsigned char *buf)
250 {
251 int i;
252 int val;
253
254 val = GRAB_BITS(buf, 1, 0, 7);
255 a->rates = 0;
256 for (i = 0; i < 7; i++)
257 if (val & (1 << i))
258 a->rates |= cea_sampling_frequencies[i + 1];
259
260 a->channels = GRAB_BITS(buf, 0, 0, 3);
261 a->channels++;
262
263 a->sample_bits = 0;
264 a->max_bitrate = 0;
265
266 a->format = GRAB_BITS(buf, 0, 3, 4);
267 switch (a->format) {
268 case AUDIO_CODING_TYPE_REF_STREAM_HEADER:
269 dev_info(dev, "HDMI: audio coding type 0 not expected\n");
270 break;
271
272 case AUDIO_CODING_TYPE_LPCM:
273 val = GRAB_BITS(buf, 2, 0, 3);
274 for (i = 0; i < 3; i++)
275 if (val & (1 << i))
276 a->sample_bits |= cea_sample_sizes[i + 1];
277 break;
278
279 case AUDIO_CODING_TYPE_AC3:
280 case AUDIO_CODING_TYPE_MPEG1:
281 case AUDIO_CODING_TYPE_MP3:
282 case AUDIO_CODING_TYPE_MPEG2:
283 case AUDIO_CODING_TYPE_AACLC:
284 case AUDIO_CODING_TYPE_DTS:
285 case AUDIO_CODING_TYPE_ATRAC:
286 a->max_bitrate = GRAB_BITS(buf, 2, 0, 8);
287 a->max_bitrate *= 8000;
288 break;
289
290 case AUDIO_CODING_TYPE_SACD:
291 break;
292
293 case AUDIO_CODING_TYPE_EAC3:
294 break;
295
296 case AUDIO_CODING_TYPE_DTS_HD:
297 break;
298
299 case AUDIO_CODING_TYPE_MLP:
300 break;
301
302 case AUDIO_CODING_TYPE_DST:
303 break;
304
305 case AUDIO_CODING_TYPE_WMAPRO:
306 a->profile = GRAB_BITS(buf, 2, 0, 3);
307 break;
308
309 case AUDIO_CODING_TYPE_REF_CXT:
310 a->format = GRAB_BITS(buf, 2, 3, 5);
311 if (a->format == AUDIO_CODING_XTYPE_HE_REF_CT ||
312 a->format >= AUDIO_CODING_XTYPE_FIRST_RESERVED) {
313 dev_info(dev,
314 "HDMI: audio coding xtype %d not expected\n",
315 a->format);
316 a->format = 0;
317 } else
> 318 a->format += AUDIO_CODING_TYPE_HE_AAC -
319 AUDIO_CODING_XTYPE_HE_AAC;
320 break;
321 }
322 }
323
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-06 9:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502061718.xOBwKElT-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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