All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [morimoto:sound-cleanup-2026-09-16-2 326/326] sound/soc/codecs/tas2781-i2c.c:1175 tasdevice_get_capture_profile_id() warn: inconsistent indenting
Date: Fri, 18 Sep 2026 16:56:36 +0200	[thread overview]
Message-ID: <202609181637.V7jmi295-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-09-18 14:57 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=202609181637.V7jmi295-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --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 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.