All of lore.kernel.org
 help / color / mirror / Atom feed
* [morimoto:sound-cleanup-2026-09-16-2 326/326] sound/soc/codecs/tas2781-i2c.c:1175 tasdevice_get_capture_profile_id() warn: inconsistent indenting
@ 2026-09-18 14:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-18 14:56 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: oe-kbuild-all

tree:   https://github.com/morimoto/linux sound-cleanup-2026-09-16-2
head:   658065d115f821c89744349f6080f3af6739e453
commit: 3c7279edf3e9a8ab8da22c9b6f7964d1b75aea3e [326/326] dai
config: riscv-randconfig-r2200-20260918 (https://download.01.org/0day-ci/archive/20260918/202609181637.V7jmi295-lkp@intel.com/config)
compiler: clang version 21.1.6 (https://github.com/llvm/llvm-project a832a5222e489298337fbb5876f8dcaf072c5cca)
smatch: v0.5.0-9187-g5189e3fb

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/202609181637.V7jmi295-lkp@intel.com/

smatch warnings:
sound/soc/codecs/tas2781-i2c.c:1175 tasdevice_get_capture_profile_id() warn: inconsistent indenting

vim +1175 sound/soc/codecs/tas2781-i2c.c

  1156	
  1157	/**
  1158	 * tasdevice_get_capture_profile_id - Report current active capture profile
  1159	 * ID to user space
  1160	 * @kcontrol: ALSA kcontrol structure passed from ALSA core
  1161	 * @ucontrol: User-space control element value buffer to write the result back
  1162	 *
  1163	 * This function ensures the returned profile ID is always clamped inside the
  1164	 * valid range advertised by the info callback, preventing accidental invalid
  1165	 * values from being exposed to applications even if internal driver state is
  1166	 * temporarily inconsistent.
  1167	 *
  1168	 * Returns 0 on successful fill of the control value, no error conditions
  1169	 * are defined for this getter callback.
  1170	 */
  1171	static int tasdevice_get_capture_profile_id(struct snd_kcontrol *kcontrol,
  1172				struct snd_ctl_elem_value *ucontrol)
  1173	{
  1174		struct snd_soc_component *codec = snd_kcontrol_chip(kcontrol);
> 1175			struct device *dev = snd_soc_component_to_dev(codec);
  1176		struct tasdevice_priv *tas_priv = dev_get_drvdata(dev);
  1177		unsigned int max_valid_id, current_prof_id;
  1178	
  1179		max_valid_id = tas_priv->rcabin.ncfgs > 0 ?
  1180			(tas_priv->rcabin.ncfgs - 1U) : 0;
  1181	
  1182		/*
  1183		 * Cast current profile id to unsigned to match type with max_valid_id,
  1184		 * avoid signedness mismatch;
  1185		 */
  1186		current_prof_id = (unsigned int)tas_priv->rcabin.capture_profile_id;
  1187		/* Prevent underflow when there are no loaded capture profiles. */
  1188		ucontrol->value.integer.value[0] = min(current_prof_id, max_valid_id);
  1189	
  1190		return 0;
  1191	}
  1192	

--
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-09-18 14:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 14:56 [morimoto:sound-cleanup-2026-09-16-2 326/326] sound/soc/codecs/tas2781-i2c.c:1175 tasdevice_get_capture_profile_id() warn: inconsistent indenting 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.