Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [morimoto:sound-cleanup-2025-04-23 110/116] sound/soc/codecs/simple-mux.c:62:48: error: incomplete definition of type 'struct snd_soc_dapm_context'
Date: Fri, 25 Apr 2025 18:05:56 +0800	[thread overview]
Message-ID: <202504251809.nFvLE1wU-lkp@intel.com> (raw)

tree:   https://github.com/morimoto/linux sound-cleanup-2025-04-23
head:   66104ef95f2f8e651b29bf32aaa483868492887e
commit: cd5502a8955a4d68f36c94affdeecf657f767438 [110/116] ASoC: soc-dapm: move struct snd_soc_dapm_context
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250425/202504251809.nFvLE1wU-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250425/202504251809.nFvLE1wU-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/202504251809.nFvLE1wU-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from sound/soc/codecs/simple-mux.c:11:
   include/sound/soc.h:1485:38: error: incomplete definition of type 'struct snd_soc_dapm_context'
    1485 |         _snd_soc_dapm_mutex_lock_root_c(dapm->card);
         |                                         ~~~~^
   include/sound/soc-topology.h:26:8: note: forward declaration of 'struct snd_soc_dapm_context'
      26 | struct snd_soc_dapm_context;
         |        ^
   In file included from sound/soc/codecs/simple-mux.c:11:
   include/sound/soc.h:1490:33: error: incomplete definition of type 'struct snd_soc_dapm_context'
    1490 |         _snd_soc_dapm_mutex_lock_c(dapm->card);
         |                                    ~~~~^
   include/sound/soc-topology.h:26:8: note: forward declaration of 'struct snd_soc_dapm_context'
      26 | struct snd_soc_dapm_context;
         |        ^
   In file included from sound/soc/codecs/simple-mux.c:11:
   include/sound/soc.h:1495:35: error: incomplete definition of type 'struct snd_soc_dapm_context'
    1495 |         _snd_soc_dapm_mutex_unlock_c(dapm->card);
         |                                      ~~~~^
   include/sound/soc-topology.h:26:8: note: forward declaration of 'struct snd_soc_dapm_context'
      26 | struct snd_soc_dapm_context;
         |        ^
   In file included from sound/soc/codecs/simple-mux.c:11:
   include/sound/soc.h:1500:40: error: incomplete definition of type 'struct snd_soc_dapm_context'
    1500 |         _snd_soc_dapm_mutex_assert_held_c(dapm->card);
         |                                           ~~~~^
   include/sound/soc-topology.h:26:8: note: forward declaration of 'struct snd_soc_dapm_context'
      26 | struct snd_soc_dapm_context;
         |        ^
   sound/soc/codecs/simple-mux.c:37:38: error: call to undeclared function 'snd_soc_dapm_kcontrol_dapm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      37 |         struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
         |                                             ^
   sound/soc/codecs/simple-mux.c:37:38: note: did you mean 'snd_soc_dapm_kcontrol_to_dapm'?
   include/sound/soc-dapm.h:702:30: note: 'snd_soc_dapm_kcontrol_to_dapm' declared here
     702 | struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_to_dapm(struct snd_kcontrol *kcontrol);
         |                              ^
   sound/soc/codecs/simple-mux.c:37:31: error: incompatible integer to pointer conversion initializing 'struct snd_soc_dapm_context *' with an expression of type 'int' [-Wint-conversion]
      37 |         struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
         |                                      ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/simple-mux.c:49:38: error: call to undeclared function 'snd_soc_dapm_kcontrol_dapm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      49 |         struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
         |                                             ^
   sound/soc/codecs/simple-mux.c:49:31: error: incompatible integer to pointer conversion initializing 'struct snd_soc_dapm_context *' with an expression of type 'int' [-Wint-conversion]
      49 |         struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
         |                                      ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/codecs/simple-mux.c:62:48: error: incomplete definition of type 'struct snd_soc_dapm_context'
      62 |         if (priv->idle_state != MUX_IDLE_AS_IS && dapm->bias_level < SND_SOC_BIAS_PREPARE)
         |                                                   ~~~~^
   include/sound/soc-topology.h:26:8: note: forward declaration of 'struct snd_soc_dapm_context'
      26 | struct snd_soc_dapm_context;
         |        ^
   9 errors generated.


vim +62 sound/soc/codecs/simple-mux.c

342fbb7578d174 Alexandre Belloni 2020-12-05  45  
342fbb7578d174 Alexandre Belloni 2020-12-05  46  static int simple_mux_control_put(struct snd_kcontrol *kcontrol,
342fbb7578d174 Alexandre Belloni 2020-12-05  47  				  struct snd_ctl_elem_value *ucontrol)
342fbb7578d174 Alexandre Belloni 2020-12-05  48  {
342fbb7578d174 Alexandre Belloni 2020-12-05  49  	struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
342fbb7578d174 Alexandre Belloni 2020-12-05  50  	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
342fbb7578d174 Alexandre Belloni 2020-12-05  51  	struct snd_soc_component *c = snd_soc_dapm_to_component(dapm);
342fbb7578d174 Alexandre Belloni 2020-12-05  52  	struct simple_mux *priv = snd_soc_component_get_drvdata(c);
342fbb7578d174 Alexandre Belloni 2020-12-05  53  
342fbb7578d174 Alexandre Belloni 2020-12-05  54  	if (ucontrol->value.enumerated.item[0] > e->items)
342fbb7578d174 Alexandre Belloni 2020-12-05  55  		return -EINVAL;
342fbb7578d174 Alexandre Belloni 2020-12-05  56  
342fbb7578d174 Alexandre Belloni 2020-12-05  57  	if (priv->mux == ucontrol->value.enumerated.item[0])
342fbb7578d174 Alexandre Belloni 2020-12-05  58  		return 0;
342fbb7578d174 Alexandre Belloni 2020-12-05  59  
342fbb7578d174 Alexandre Belloni 2020-12-05  60  	priv->mux = ucontrol->value.enumerated.item[0];
342fbb7578d174 Alexandre Belloni 2020-12-05  61  
2b974284aa073d Hendrik v. Raven  2024-11-14 @62  	if (priv->idle_state != MUX_IDLE_AS_IS && dapm->bias_level < SND_SOC_BIAS_PREPARE)
2b974284aa073d Hendrik v. Raven  2024-11-14  63  		return 0;
2b974284aa073d Hendrik v. Raven  2024-11-14  64  
342fbb7578d174 Alexandre Belloni 2020-12-05  65  	gpiod_set_value_cansleep(priv->gpiod_mux, priv->mux);
342fbb7578d174 Alexandre Belloni 2020-12-05  66  
342fbb7578d174 Alexandre Belloni 2020-12-05  67  	return snd_soc_dapm_mux_update_power(dapm, kcontrol,
342fbb7578d174 Alexandre Belloni 2020-12-05  68  					     ucontrol->value.enumerated.item[0],
342fbb7578d174 Alexandre Belloni 2020-12-05  69  					     e, NULL);
342fbb7578d174 Alexandre Belloni 2020-12-05  70  }
342fbb7578d174 Alexandre Belloni 2020-12-05  71  

:::::: The code at line 62 was first introduced by commit
:::::: 2b974284aa073d6e2936f9032e8ad7b99480b5b8 ASoc: simple-mux: add idle-state support

:::::: TO: Hendrik v. Raven <h.v.raven@merzmedtech.de>
:::::: CC: Mark Brown <broonie@kernel.org>

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

                 reply	other threads:[~2025-04-25 10:06 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=202504251809.nFvLE1wU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox