Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [morimoto:sound-cleanup-2025-04-22 101/103] sound/soc/soc-dapm.c:2144:11: warning: no case matching constant switch condition '0'
@ 2025-04-22 23:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-04-22 23:28 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/morimoto/linux sound-cleanup-2025-04-22
head:   f743db58ae26ad957c2beb5f627c328ec8473d30
commit: 3b625de97e3c01b90a1b11976d6732c77df85815 [101/103] ASoC: soc-dapm: tidyup idle_bias handling - step2
config: hexagon-randconfig-002-20250423 (https://download.01.org/0day-ci/archive/20250423/202504230702.UE4GS253-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250423/202504230702.UE4GS253-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/202504230702.UE4GS253-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/soc-dapm.c:2144:11: warning: no case matching constant switch condition '0'
    2144 |                 switch (snd_power_get_state(dapm->card->snd_card)) {
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/sound/core.h:210:35: note: expanded from macro 'snd_power_get_state'
     210 | #define snd_power_get_state(card)       ({ (void)(card); SNDRV_CTL_POWER_D0; })
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +/0 +2144 sound/soc/soc-dapm.c

05623c4314cba39 Mark Brown         2011-09-28  2138  
977f312aeaeecd0 Kuninori Morimoto  2025-04-22  2139  static bool dapm_get_idle_bias(struct snd_soc_dapm_context *dapm)
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2140  {
3b625de97e3c01b Kuninori Morimoto  2025-04-22  2141  	if (dapm->idle_bias) {
7369d281c9df84b Kuninori Morimoto  2025-04-22  2142  		struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2143  
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04 @2144  		switch (snd_power_get_state(dapm->card->snd_card)) {
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2145  		case SNDRV_CTL_POWER_D3hot:
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2146  		case SNDRV_CTL_POWER_D3cold:
7369d281c9df84b Kuninori Morimoto  2025-04-22  2147  			if (component)
977f312aeaeecd0 Kuninori Morimoto  2025-04-22  2148  				return !component->driver->suspend_bias_off;
3b625de97e3c01b Kuninori Morimoto  2025-04-22  2149  		}
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2150  	}
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2151  
3b625de97e3c01b Kuninori Morimoto  2025-04-22  2152  	return dapm->idle_bias;
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2153  }
86dbf2ac6fcb2d2 Lars-Peter Clausen 2014-09-04  2154  

:::::: The code at line 2144 was first introduced by commit
:::::: 86dbf2ac6fcb2d2932d4610f2dfe0954aa0633f7 ASoC: Add support for automatically going to BIAS_OFF on suspend

:::::: TO: Lars-Peter Clausen <lars@metafoo.de>
:::::: CC: Mark Brown <broonie@kernel.org>

-- 
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:[~2025-04-22 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 23:28 [morimoto:sound-cleanup-2025-04-22 101/103] sound/soc/soc-dapm.c:2144:11: warning: no case matching constant switch condition '0' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox