[linux-next:master 6484/6946] sound/soc/codecs/cs42l43.c:142:6: sparse: sparse: symbol 'cs42l43_hp_ilimit_clear_work' was not declared. Should it be static?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   abb240f7a2bd14567ab53e602db562bb683391e6
commit: bbbc18d8c27cc9d40cc9a3b03b61e4df85311146 [6484/6946] ASoC: cs42l43: Allow HP amp to cool off after current limit
config: alpha-randconfig-r113-20231212 (https://download.01.org/0day-ci/archive/20231212/202312121926.GC7OYtbZ-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231212/202312121926.GC7OYtbZ-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312121926.GC7OYtbZ-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/cs42l43.c:142:6: sparse: sparse: symbol 'cs42l43_hp_ilimit_clear_work' was not declared. Should it be static?
>> sound/soc/codecs/cs42l43.c:159:6: sparse: sparse: symbol 'cs42l43_hp_ilimit_work' was not declared. Should it be static?

vim +/cs42l43_hp_ilimit_clear_work +142 sound/soc/codecs/cs42l43.c

   141	
 > 142	void cs42l43_hp_ilimit_clear_work(struct work_struct *work)
   143	{
   144		struct cs42l43_codec *priv = container_of(work, struct cs42l43_codec,
   145							  hp_ilimit_clear_work.work);
   146		struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(priv->component);
   147	
   148		snd_soc_dapm_mutex_lock(dapm);
   149	
   150		priv->hp_ilimit_count--;
   151	
   152		if (priv->hp_ilimit_count)
   153			queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work,
   154					   msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS));
   155	
   156		snd_soc_dapm_mutex_unlock(dapm);
   157	}
   158	
 > 159	void cs42l43_hp_ilimit_work(struct work_struct *work)
   160	{
   161		struct cs42l43_codec *priv = container_of(work, struct cs42l43_codec,
   162							  hp_ilimit_work);
   163		struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(priv->component);
   164		struct cs42l43 *cs42l43 = priv->core;
   165	
   166		snd_soc_dapm_mutex_lock(dapm);
   167	
   168		if (priv->hp_ilimit_count < CS42L43_HP_ILIMIT_MAX_COUNT) {
   169			if (!priv->hp_ilimit_count)
   170				queue_delayed_work(system_wq, &priv->hp_ilimit_clear_work,
   171						   msecs_to_jiffies(CS42L43_HP_ILIMIT_DECAY_MS));
   172	
   173			priv->hp_ilimit_count++;
   174			snd_soc_dapm_mutex_unlock(dapm);
   175			return;
   176		}
   177	
   178		dev_err(priv->dev, "Disabling headphone for %dmS, due to frequent current limit\n",
   179			CS42L43_HP_ILIMIT_BACKOFF_MS);
   180	
   181		priv->hp_ilimited = true;
   182	
   183		// No need to wait for disable, as just disabling for a period of time
   184		regmap_update_bits(cs42l43->regmap, CS42L43_BLOCK_EN8,
   185				   CS42L43_HP_EN_MASK, 0);
   186	
   187		snd_soc_dapm_mutex_unlock(dapm);
   188	
   189		msleep(CS42L43_HP_ILIMIT_BACKOFF_MS);
   190	
   191		snd_soc_dapm_mutex_lock(dapm);
   192	
   193		if (priv->hp_ena && !priv->load_detect_running) {
   194			unsigned long time_left;
   195	
   196			reinit_completion(&priv->hp_startup);
   197	
   198			regmap_update_bits(cs42l43->regmap, CS42L43_BLOCK_EN8,
   199					   CS42L43_HP_EN_MASK, priv->hp_ena);
   200	
   201			time_left = wait_for_completion_timeout(&priv->hp_startup,
   202								msecs_to_jiffies(CS42L43_HP_TIMEOUT_MS));
   203			if (!time_left)
   204				dev_err(priv->dev, "ilimit HP restore timed out\n");
   205		}
   206	
   207		priv->hp_ilimited = false;
   208	
   209		snd_soc_dapm_mutex_unlock(dapm);
   210	}
   211	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux