From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [android-common:android-mainline 1/1] sound/i2c/tea6330t.c:387:12-13: WARNING opportunity for min()
Date: Thu, 21 May 2026 06:03:49 +0800 [thread overview]
Message-ID: <202605210507.FdZYVCd0-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com
tree: https://android.googlesource.com/kernel/common android-mainline
head: f39201044b1ecbd7a392dff9ce223d210f51d1e9
commit: 19cbb3e0c27f28feb7781641994226cb2ee206a2 [1/1] ALSA: tea6330t: add mixer state restore helper
:::::: branch date: 4 hours ago
:::::: commit date: 6 weeks ago
config: i386-randconfig-052 (https://download.01.org/0day-ci/archive/20260521/202605210507.FdZYVCd0-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
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
| Fixes: 19cbb3e0c27f ("ALSA: tea6330t: add mixer state restore helper")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202605210507.FdZYVCd0-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> sound/i2c/tea6330t.c:387:12-13: WARNING opportunity for min()
vim +387 sound/i2c/tea6330t.c
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 360
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 361 int snd_tea6330t_restore_mixer(struct snd_i2c_bus *bus)
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 362 {
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 363 struct snd_i2c_device *device;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 364 struct tea6330t *tea;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 365 unsigned char bytes[7];
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 366 unsigned int idx;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 367 int err;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 368
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 369 if (!bus)
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 370 return -EINVAL;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 371
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 372 snd_i2c_lock(bus);
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 373 list_for_each_entry(device, &bus->devices, list) {
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 374 if (device->addr != TEA6330T_ADDR)
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 375 continue;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 376
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 377 tea = device->private_data;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 378 if (!tea) {
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 379 err = -EINVAL;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 380 goto unlock;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 381 }
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 382
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 383 bytes[0] = TEA6330T_SADDR_VOLUME_LEFT;
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 384 for (idx = 0; idx < 6; idx++)
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 385 bytes[idx + 1] = tea->regs[idx];
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 386 err = snd_i2c_sendbytes(device, bytes, 7);
19cbb3e0c27f28fe Cássio Gabriel 2026-04-07 @387 err = err < 0 ? err : 0;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-20 22:05 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=202605210507.FdZYVCd0-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@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 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.