linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Mark Brown <broonie@kernel.org>
Subject: [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: Tue, 12 Dec 2023 19:28:52 +0800	[thread overview]
Message-ID: <202312121926.GC7OYtbZ-lkp@intel.com> (raw)

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@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231212/202312121926.GC7OYtbZ-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/202312121926.GC7OYtbZ-lkp@intel.com/

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


                 reply	other threads:[~2023-12-12 11:30 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=202312121926.GC7OYtbZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linux-mm@kvack.org \
    --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