All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android-mainline 1/1] sound/i2c/tea6330t.c:387:12-13: WARNING opportunity for min()
@ 2026-05-20 22:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-20 22:03 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-20 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20 22:03 [android-common:android-mainline 1/1] sound/i2c/tea6330t.c:387:12-13: WARNING opportunity for min() kernel test robot

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.