[soc:board-remove 138/217] sound/soc/ti/omap-twl4030.c:138:38: warning: unused variable 'dapm'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all,org.infradead.lists.linux-arm-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git board-remove
head:   057394422bc04420585b2790b230d8a1f350ace8
commit: f6d934b99b4df95800d72522490f3d30d4c16ef1 [138/217] ASoC: omap-twl4030: remove platform_data based probe
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260816/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   sound/soc/ti/omap-twl4030.c: In function 'omap_twl4030_init':
>> sound/soc/ti/omap-twl4030.c:138:38: warning: unused variable 'dapm' [-Wunused-variable]
     138 |         struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
         |                                      ^~~~


vim +/dapm +138 sound/soc/ti/omap-twl4030.c

bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  134  
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  135  static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  136  {
0596f70069bb5a sound/soc/omap/omap-twl4030.c Lars-Peter Clausen 2014-05-19  137  	struct snd_soc_card *card = rtd->card;
42e142c842cb9c sound/soc/ti/omap-twl4030.c   Kuninori Morimoto  2025-11-11 @138  	struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  139  	struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  140  	int ret = 0;
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  141  
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  142  	/*
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  143  	 * This is a bit of a hack, but the GPIO is optional so we
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  144  	 * only want to add the jack detection if the GPIO is there.
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  145  	 */
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  146  	if (of_property_present(card->dev->of_node, "ti,jack-det-gpio")) {
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  147  		hs_jack_gpios[0].gpiod_dev = card->dev;
1b8a62937e0b23 sound/soc/ti/omap-twl4030.c   Linus Walleij      2023-09-26  148  		hs_jack_gpios[0].idx = 0;
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  149  
19aed2d6cdb72a sound/soc/ti/omap-twl4030.c   Akihiko Odaki      2022-04-08  150  		ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack",
19aed2d6cdb72a sound/soc/ti/omap-twl4030.c   Akihiko Odaki      2022-04-08  151  						 SND_JACK_HEADSET,
19aed2d6cdb72a sound/soc/ti/omap-twl4030.c   Akihiko Odaki      2022-04-08  152  						 &priv->hs_jack, hs_jack_pins,
da21cf6d652836 sound/soc/omap/omap-twl4030.c Lars-Peter Clausen 2015-03-04  153  						 ARRAY_SIZE(hs_jack_pins));
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  154  		if (ret)
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  155  			return ret;
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  156  
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  157  		ret = snd_soc_jack_add_gpios(&priv->hs_jack,
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  158  					     ARRAY_SIZE(hs_jack_gpios),
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  159  					     hs_jack_gpios);
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  160  		if (ret)
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  161  			return ret;
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  162  	}
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  163  
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  164  	return ret;
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  165  }
bd0b286e838ef1 sound/soc/omap/omap-twl4030.c Peter Ujfalusi     2012-12-31  166  

:::::: The code at line 138 was first introduced by commit
:::::: 42e142c842cb9c7dbde569ff137974e76d1a0e67 ASoC: ti: omap-twl4030: convert to snd_soc_dapm_xxx()

:::::: TO: Kuninori Morimoto <[email protected]>
:::::: CC: Mark Brown <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.