Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Mark Brown <broonie@kernel.org>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.dev>
Subject: [broonie-ci:asoc-7.2 1/4] sound/soc/sdca/sdca_jack.c:211:5: warning: variable 'jack_state' is uninitialized when used here
Date: Tue, 05 May 2026 05:25:19 +0800	[thread overview]
Message-ID: <202605050544.46Z8qOSY-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git asoc-7.2
head:   50c2f0f086641fb96d4eb67a559ee18d441355b6
commit: cb3c257e08248521b22c67259d50ebb18574d1a1 [1/4] ASoC: SDCA: Add correct masks whilst reporting SDCA jack status
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20260505/202605050544.46Z8qOSY-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260505/202605050544.46Z8qOSY-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/202605050544.46Z8qOSY-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/sdca/sdca_jack.c:211:5: warning: variable 'jack_state' is uninitialized when used here [-Wuninitialized]
     211 |                                 jack_state->mask |= type_get_mask(type);
         |                                 ^~~~~~~~~~
   sound/soc/sdca/sdca_jack.c:193:32: note: initialize the variable 'jack_state' to silence this warning
     193 |                 struct jack_state *jack_state;
         |                                              ^
         |                                               = NULL
   1 warning generated.


vim +/jack_state +211 sound/soc/sdca/sdca_jack.c

   173	
   174	/**
   175	 * sdca_jack_set_jack - attach an ASoC jack to SDCA
   176	 * @info: SDCA interrupt information.
   177	 * @jack: ASoC jack to be attached.
   178	 *
   179	 * Return: Zero on success or a negative error code.
   180	 */
   181	int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *jack)
   182	{
   183		int i, j;
   184		int ret;
   185	
   186		guard(mutex)(&info->irq_lock);
   187	
   188		for (i = 0; i < SDCA_MAX_INTERRUPTS; i++) {
   189			struct sdca_interrupt *interrupt = &info->irqs[i];
   190			struct sdca_control *control = interrupt->control;
   191			struct sdca_entity *entity = interrupt->entity;
   192			struct sdca_control_range *range;
   193			struct jack_state *jack_state;
   194	
   195			if (!interrupt->irq)
   196				continue;
   197	
   198			switch (SDCA_CTL_TYPE(entity->type, control->sel)) {
   199			case SDCA_CTL_TYPE_S(GE, DETECTED_MODE):
   200				range = sdca_selector_find_range(interrupt->dev, entity,
   201								 SDCA_CTL_GE_SELECTED_MODE,
   202								 SDCA_SELECTED_MODE_NCOLS, 0);
   203				if (!range)
   204					return -EINVAL;
   205	
   206				for (j = 0; j < range->rows; j++) {
   207					enum sdca_terminal_type type;
   208	
   209					type = sdca_range(range, SDCA_SELECTED_MODE_TERM_TYPE, j);
   210	
 > 211					jack_state->mask |= type_get_mask(type);
   212				}
   213	
   214				jack_state = interrupt->priv;
   215				jack_state->jack = jack;
   216	
   217				/* Report initial state in case IRQ was already handled */
   218				ret = sdca_jack_report(interrupt);
   219				if (ret)
   220					return ret;
   221				break;
   222			default:
   223				break;
   224			}
   225		}
   226	
   227		return 0;
   228	}
   229	EXPORT_SYMBOL_NS_GPL(sdca_jack_set_jack, "SND_SOC_SDCA");
   230	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-05-04 21:25 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=202605050544.46Z8qOSY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pierre-louis.bossart@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