[PATCH 1/4] ALSA: core: Add async signal helpers

kernel test robot lkp at intel.com
Wed Jul 27 03:14:53 CEST 2022


Hi Takashi,

I love your patch! Yet something to improve:

[auto build test ERROR on tiwai-sound/for-next]
[also build test ERROR on linus/master v5.19-rc8 next-20220726]
[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-Defer-async-signal-handling/20220726-233840
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: csky-randconfig-r014-20220726 (https://download.01.org/0day-ci/archive/20220727/202207270950.zWfcvyEK-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0
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/e5977c421331e16237bf3ebd283981757e03f433
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Takashi-Iwai/ALSA-Defer-async-signal-handling/20220726-233840
        git checkout e5977c421331e16237bf3ebd283981757e03f433
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash sound/core/

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

All errors (new ones prefixed by >>):

   sound/core/misc.c: In function 'snd_fasync_work_fn':
>> sound/core/misc.c:180:25: error: implicit declaration of function 'kill_fasync'; did you mean 'snd_kill_fasync'? [-Werror=implicit-function-declaration]
     180 |                         kill_fasync(&fasync->fasync, fasync->signal, fasync->poll);
         |                         ^~~~~~~~~~~
         |                         snd_kill_fasync
   sound/core/misc.c: In function 'snd_fasync_helper':
>> sound/core/misc.c:213:16: error: implicit declaration of function 'fasync_helper'; did you mean 'snd_fasync_helper'? [-Werror=implicit-function-declaration]
     213 |         return fasync_helper(fd, file, on, &fasync->fasync);
         |                ^~~~~~~~~~~~~
         |                snd_fasync_helper
   cc1: some warnings being treated as errors


vim +180 sound/core/misc.c

   169	
   170	static void snd_fasync_work_fn(struct work_struct *work)
   171	{
   172		struct snd_fasync *fasync;
   173	
   174		spin_lock_irq(&snd_fasync_lock);
   175		while (!list_empty(&snd_fasync_list)) {
   176			fasync = list_first_entry(&snd_fasync_list, struct snd_fasync, list);
   177			list_del_init(&fasync->list);
   178			spin_unlock_irq(&snd_fasync_lock);
   179			if (fasync->on)
 > 180				kill_fasync(&fasync->fasync, fasync->signal, fasync->poll);
   181			spin_lock_irq(&snd_fasync_lock);
   182		}
   183		spin_unlock_irq(&snd_fasync_lock);
   184	}
   185	
   186	static DECLARE_WORK(snd_fasync_work, snd_fasync_work_fn);
   187	
   188	int snd_fasync_helper(int fd, struct file *file, int on,
   189			      struct snd_fasync **fasyncp)
   190	{
   191		struct snd_fasync *fasync = NULL;
   192	
   193		if (on) {
   194			fasync = kzalloc(sizeof(*fasync), GFP_KERNEL);
   195			if (!fasync)
   196				return -ENOMEM;
   197			INIT_LIST_HEAD(&fasync->list);
   198		}
   199	
   200		spin_lock_irq(&snd_fasync_lock);
   201		if (*fasyncp) {
   202			kfree(fasync);
   203			fasync = *fasyncp;
   204		} else {
   205			if (!fasync) {
   206				spin_unlock_irq(&snd_fasync_lock);
   207				return 0;
   208			}
   209			*fasyncp = fasync;
   210		}
   211		fasync->on = on;
   212		spin_unlock_irq(&snd_fasync_lock);
 > 213		return fasync_helper(fd, file, on, &fasync->fasync);
   214	}
   215	EXPORT_SYMBOL_GPL(snd_fasync_helper);
   216	

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


More information about the Alsa-devel mailing list