All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hector Martin <marcan@marcan.st>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [asahilinux:bits/070-audio 71/100] sound/soc/apple/macaudio.c:1386:5: warning: no previous prototype for function 'macaudio_slk_get'
Date: Mon, 20 Nov 2023 00:52:53 +0800	[thread overview]
Message-ID: <202311200029.mAI9eX6s-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/070-audio
head:   1c71b1fa2c491cc29c94d29f1a450dba39f27557
commit: ba781f688d2d45d603340b2515236cd40fb0b41c [71/100] macaudio: Add a getter for the interlock
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231120/202311200029.mAI9eX6s-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231120/202311200029.mAI9eX6s-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/202311200029.mAI9eX6s-lkp@intel.com/

All warnings (new ones prefixed by >>):

   sound/soc/apple/macaudio.c:198:6: warning: no previous prototype for function 'macaudio_vlimit_unlock' [-Wmissing-prototypes]
   void macaudio_vlimit_unlock(struct macaudio_snd_data *ma, bool unlock)
        ^
   sound/soc/apple/macaudio.c:198:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void macaudio_vlimit_unlock(struct macaudio_snd_data *ma, bool unlock)
   ^
   static 
   sound/soc/apple/macaudio.c:220:6: warning: no previous prototype for function 'macaudio_vlimit_update' [-Wmissing-prototypes]
   void macaudio_vlimit_update(struct macaudio_snd_data *ma)
        ^
   sound/soc/apple/macaudio.c:220:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void macaudio_vlimit_update(struct macaudio_snd_data *ma)
   ^
   static 
   sound/soc/apple/macaudio.c:1319:5: warning: no previous prototype for function 'macaudio_sss_info' [-Wmissing-prototypes]
   int macaudio_sss_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
       ^
   sound/soc/apple/macaudio.c:1319:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_sss_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
   ^
   static 
   sound/soc/apple/macaudio.c:1329:5: warning: no previous prototype for function 'macaudio_sss_get' [-Wmissing-prototypes]
   int macaudio_sss_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
       ^
   sound/soc/apple/macaudio.c:1329:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_sss_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
   ^
   static 
   sound/soc/apple/macaudio.c:1344:5: warning: no previous prototype for function 'macaudio_slk_info' [-Wmissing-prototypes]
   int macaudio_slk_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
       ^
   sound/soc/apple/macaudio.c:1344:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_slk_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
   ^
   static 
   sound/soc/apple/macaudio.c:1354:5: warning: no previous prototype for function 'macaudio_slk_put' [-Wmissing-prototypes]
   int macaudio_slk_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
       ^
   sound/soc/apple/macaudio.c:1354:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_slk_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
   ^
   static 
>> sound/soc/apple/macaudio.c:1386:5: warning: no previous prototype for function 'macaudio_slk_get' [-Wmissing-prototypes]
   int macaudio_slk_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
       ^
   sound/soc/apple/macaudio.c:1386:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_slk_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
   ^
   static 
   sound/soc/apple/macaudio.c:1396:5: warning: no previous prototype for function 'macaudio_slk_lock' [-Wmissing-prototypes]
   int macaudio_slk_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_file *owner)
       ^
   sound/soc/apple/macaudio.c:1396:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int macaudio_slk_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_file *owner)
   ^
   static 
   sound/soc/apple/macaudio.c:1415:6: warning: no previous prototype for function 'macaudio_slk_unlock' [-Wmissing-prototypes]
   void macaudio_slk_unlock(struct snd_kcontrol *kcontrol)
        ^
   sound/soc/apple/macaudio.c:1415:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void macaudio_slk_unlock(struct snd_kcontrol *kcontrol)
   ^
   static 
   9 warnings generated.


vim +/macaudio_slk_get +1386 sound/soc/apple/macaudio.c

  1353	
> 1354	int macaudio_slk_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
  1355	{
  1356		struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
  1357		struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
  1358	
  1359		if (!ma->speaker_lock_owner)
  1360			return -EPERM;
  1361	
  1362		if (uvalue->value.integer.value[0] != SPEAKER_MAGIC_VALUE)
  1363			return -EINVAL;
  1364	
  1365		/* Serves as a notification that the lock was lost at some point */
  1366		if (ma->speaker_volume_was_locked) {
  1367			ma->speaker_volume_was_locked = false;
  1368			return -ETIMEDOUT;
  1369		}
  1370	
  1371		cancel_delayed_work(&ma->lock_timeout_work);
  1372	
  1373		ma->speaker_lock_remain = ms_to_ktime(SPEAKER_LOCK_TIMEOUT);
  1374		ma->speaker_lock_timeout = ktime_add(ktime_get(), ma->speaker_lock_remain);
  1375		macaudio_vlimit_update(ma);
  1376	
  1377		if (ma->speaker_lock_timeout_enabled) {
  1378			dev_dbg(ma->card.dev, "Volume limit timeout ping: %ld us left\n",
  1379				(long)ktime_to_us(ma->speaker_lock_remain));
  1380			schedule_delayed_work(&ma->lock_timeout_work, usecs_to_jiffies(ktime_to_us(ma->speaker_lock_remain)));
  1381		}
  1382	
  1383		return 0;
  1384	}
  1385	
> 1386	int macaudio_slk_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *uvalue)
  1387	{
  1388		struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
  1389		struct macaudio_snd_data *ma = snd_soc_card_get_drvdata(card);
  1390	
  1391		uvalue->value.integer.value[0] = ma->speaker_volume_unlocked ? 1 : 0;
  1392	
  1393		return 0;
  1394	}
  1395	

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

                 reply	other threads:[~2023-11-19 16:53 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=202311200029.mAI9eX6s-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marcan@marcan.st \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.