[PATCH] ALSA: memalloc: Revive x86-specific WC page allocations again

kernel test robot lkp at intel.com
Sun Aug 21 13:48:39 CEST 2022


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 v6.0-rc1 next-20220819]
[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-memalloc-Revive-x86-specific-WC-page-allocations-again/20220821-162443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: openrisc-randconfig-s052-20220821 (https://download.01.org/0day-ci/archive/20220821/202208211945.6Lmqeudy-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/86072b28544f52618e4ce8336ba80be1d67f38d9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Takashi-Iwai/ALSA-memalloc-Revive-x86-specific-WC-page-allocations-again/20220821-162443
        git checkout 86072b28544f52618e4ce8336ba80be1d67f38d9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc 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>

sparse warnings: (new ones prefixed by >>)
>> sound/core/memalloc.c:289:43: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted gfp_t [usertype] gfp_mask @@     got unsigned long gfp @@
   sound/core/memalloc.c:289:43: sparse:     expected restricted gfp_t [usertype] gfp_mask
   sound/core/memalloc.c:289:43: sparse:     got unsigned long gfp
>> sound/core/memalloc.c:299:52: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long gfp @@     got restricted gfp_t @@
   sound/core/memalloc.c:299:52: sparse:     expected unsigned long gfp
   sound/core/memalloc.c:299:52: sparse:     got restricted gfp_t

vim +289 sound/core/memalloc.c

37af81c5998f4b Takashi Iwai 2021-06-09  283  
37af81c5998f4b Takashi Iwai 2021-06-09  284  /*
37af81c5998f4b Takashi Iwai 2021-06-09  285   * Continuous pages allocator
37af81c5998f4b Takashi Iwai 2021-06-09  286   */
86072b28544f52 Takashi Iwai 2022-08-21  287  static void *do_alloc_pages(size_t size, dma_addr_t *addr, unsigned long gfp)
37af81c5998f4b Takashi Iwai 2021-06-09  288  {
f84ba106a0185b Takashi Iwai 2021-08-04 @289  	void *p = alloc_pages_exact(size, gfp);
37af81c5998f4b Takashi Iwai 2021-06-09  290  
f84ba106a0185b Takashi Iwai 2021-08-04  291  	if (p)
86072b28544f52 Takashi Iwai 2022-08-21  292  		*addr = page_to_phys(virt_to_page(p));
f84ba106a0185b Takashi Iwai 2021-08-04  293  	return p;
37af81c5998f4b Takashi Iwai 2021-06-09  294  }
37af81c5998f4b Takashi Iwai 2021-06-09  295  
86072b28544f52 Takashi Iwai 2022-08-21  296  static void *snd_dma_continuous_alloc(struct snd_dma_buffer *dmab, size_t size)
86072b28544f52 Takashi Iwai 2022-08-21  297  {
86072b28544f52 Takashi Iwai 2022-08-21  298  	return do_alloc_pages(size, &dmab->addr,
86072b28544f52 Takashi Iwai 2022-08-21 @299  			      snd_mem_get_gfp_flags(dmab, GFP_KERNEL));
86072b28544f52 Takashi Iwai 2022-08-21  300  }
86072b28544f52 Takashi Iwai 2022-08-21  301  

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


More information about the Alsa-devel mailing list