Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [PATCH 2/5] ALSA: pcm: Drop async signal support
Date: Sun, 17 Jul 2022 01:53:00 +0800	[thread overview]
Message-ID: <202207170141.kyNwoI54-lkp@intel.com> (raw)
In-Reply-To: <20220715102935.4695-3-tiwai@suse.de>

Hi Takashi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tiwai-sound/for-next]
[also build test WARNING on linus/master v5.19-rc6 next-20220715]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Takashi-Iwai/ALSA-Drop-async-signal-support/20220716-211853
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: i386-randconfig-a011 (https://download.01.org/0day-ci/archive/20220717/202207170141.kyNwoI54-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 07022e6cf9b5b3baa642be53d0b3c3f1c403dbfd)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/6705167eb6bf093c8a099fa16c0aeb5f3da0dfba
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Takashi-Iwai/ALSA-Drop-async-signal-support/20220716-211853
        git checkout 6705167eb6bf093c8a099fa16c0aeb5f3da0dfba
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash sound/core/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> sound/core/pcm_lib.c:1810:26: warning: variable 'runtime' set but not used [-Wunused-but-set-variable]
           struct snd_pcm_runtime *runtime;
                                   ^
   1 warning generated.


vim +/runtime +1810 sound/core/pcm_lib.c

e88e8ae639a490 Takashi Iwai     2006-04-28  1780  
^1da177e4c3f41 Linus Torvalds   2005-04-16  1781  /**
47271b1b98c980 Takashi Sakamoto 2021-06-10  1782   * snd_pcm_period_elapsed_under_stream_lock() - update the status of runtime for the next period
47271b1b98c980 Takashi Sakamoto 2021-06-10  1783   *						under acquired lock of PCM substream.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1784   * @substream: the instance of pcm substream.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1785   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1786   * This function is called when the batch of audio data frames as the same size as the period of
47271b1b98c980 Takashi Sakamoto 2021-06-10  1787   * buffer is already processed in audio data transmission.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1788   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1789   * The call of function updates the status of runtime with the latest position of audio data
47271b1b98c980 Takashi Sakamoto 2021-06-10  1790   * transmission, checks overrun and underrun over buffer, awaken user processes from waiting for
47271b1b98c980 Takashi Sakamoto 2021-06-10  1791   * available audio data frames, sampling audio timestamp, and performs stop or drain the PCM
47271b1b98c980 Takashi Sakamoto 2021-06-10  1792   * substream according to configured threshold.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1793   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1794   * The function is intended to use for the case that PCM driver operates audio data frames under
47271b1b98c980 Takashi Sakamoto 2021-06-10  1795   * acquired lock of PCM substream; e.g. in callback of any operation of &snd_pcm_ops in process
47271b1b98c980 Takashi Sakamoto 2021-06-10  1796   * context. In any interrupt context, it's preferrable to use ``snd_pcm_period_elapsed()`` instead
47271b1b98c980 Takashi Sakamoto 2021-06-10  1797   * since lock of PCM substream should be acquired in advance.
^1da177e4c3f41 Linus Torvalds   2005-04-16  1798   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1799   * Developer should pay enough attention that some callbacks in &snd_pcm_ops are done by the call of
47271b1b98c980 Takashi Sakamoto 2021-06-10  1800   * function:
^1da177e4c3f41 Linus Torvalds   2005-04-16  1801   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1802   * - .pointer - to retrieve current position of audio data transmission by frame count or XRUN state.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1803   * - .trigger - with SNDRV_PCM_TRIGGER_STOP at XRUN or DRAINING state.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1804   * - .get_time_info - to retrieve audio time stamp if needed.
47271b1b98c980 Takashi Sakamoto 2021-06-10  1805   *
47271b1b98c980 Takashi Sakamoto 2021-06-10  1806   * Even if more than one periods have elapsed since the last call, you have to call this only once.
^1da177e4c3f41 Linus Torvalds   2005-04-16  1807   */
47271b1b98c980 Takashi Sakamoto 2021-06-10  1808  void snd_pcm_period_elapsed_under_stream_lock(struct snd_pcm_substream *substream)
^1da177e4c3f41 Linus Torvalds   2005-04-16  1809  {
877211f5e1b119 Takashi Iwai     2005-11-17 @1810  	struct snd_pcm_runtime *runtime;
^1da177e4c3f41 Linus Torvalds   2005-04-16  1811  
f5cdc9d4003a2f paulhsia         2019-11-13  1812  	if (PCM_RUNTIME_CHECK(substream))
47271b1b98c980 Takashi Sakamoto 2021-06-10  1813  		return;
f5cdc9d4003a2f paulhsia         2019-11-13  1814  	runtime = substream->runtime;
f5cdc9d4003a2f paulhsia         2019-11-13  1815  
^1da177e4c3f41 Linus Torvalds   2005-04-16  1816  	if (!snd_pcm_running(substream) ||
f240406babfe15 Jaroslav Kysela  2010-01-05  1817  	    snd_pcm_update_hw_ptr0(substream, 1) < 0)
6705167eb6bf09 Takashi Iwai     2022-07-15  1818  		return;
^1da177e4c3f41 Linus Torvalds   2005-04-16  1819  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-07-16 17:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 10:29 [PATCH 0/5] ALSA: Drop async signal support Takashi Iwai
2022-07-15 10:29 ` [PATCH 1/5] ALSA: timer: " Takashi Iwai
2022-07-15 10:29 ` [PATCH 2/5] ALSA: pcm: " Takashi Iwai
2022-07-16 17:02   ` kernel test robot
2022-07-16 17:53   ` kernel test robot [this message]
2022-07-15 10:29 ` [PATCH 3/5] ALSA: control: " Takashi Iwai
2022-07-15 10:29 ` [PATCH 4/5] ALSA: core: " Takashi Iwai
2022-07-15 10:29 ` [PATCH 5/5] ALSA: doc: Drop stale fasync entry Takashi Iwai

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=202207170141.kyNwoI54-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    --cc=tiwai@suse.de \
    /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