Re: [PATCH v11 05/10] drm/shmem-helper: Add memory shrinker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dmitry,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[cannot apply to drm/drm-next drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.2 next-20230227]
[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/Dmitry-Osipenko/drm-shmem-helper-Factor-out-pages-alloc-release-from-drm_gem_shmem_get-put_pages/20230227-140619
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20230227060219.904986-6-dmitry.osipenko%40collabora.com
patch subject: [PATCH v11 05/10] drm/shmem-helper: Add memory shrinker
config: riscv-randconfig-r006-20230227 (https://download.01.org/0day-ci/archive/20230227/202302271624.aEDOT0UV-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db89896bbbd2251fff457699635acbbedeead27f)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/c4d106484ddbebccf4219dacbc2a9975909f4c2a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Dmitry-Osipenko/drm-shmem-helper-Factor-out-pages-alloc-release-from-drm_gem_shmem_get-put_pages/20230227-140619
        git checkout c4d106484ddbebccf4219dacbc2a9975909f4c2a
        # 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=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202302271624.aEDOT0UV-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/drm_gem_shmem_helper.c:832:18: warning: no previous prototype for function 'drm_gem_shmem_get_pages_sgt_locked' [-Wmissing-prototypes]
   struct sg_table *drm_gem_shmem_get_pages_sgt_locked(struct drm_gem_shmem_object *shmem)
                    ^
   drivers/gpu/drm/drm_gem_shmem_helper.c:832:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct sg_table *drm_gem_shmem_get_pages_sgt_locked(struct drm_gem_shmem_object *shmem)
   ^
   static 
>> drivers/gpu/drm/drm_gem_shmem_helper.c:1016:7: error: too many arguments to function call, expected 3, have 4
                                     drm_gem_shmem_shrinker_purge);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:489:15: note: 'drm_gem_lru_scan' declared here
   unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru, unsigned nr_to_scan,
                 ^
   drivers/gpu/drm/drm_gem_shmem_helper.c:1022:8: error: too many arguments to function call, expected 3, have 4
                                             drm_gem_shmem_shrinker_evict);
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/drm/drm_gem.h:489:15: note: 'drm_gem_lru_scan' declared here
   unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru, unsigned nr_to_scan,
                 ^
   1 warning and 2 errors generated.


vim +1016 drivers/gpu/drm/drm_gem_shmem_helper.c

  1001	
  1002	static unsigned long
  1003	drm_gem_shmem_shrinker_scan_objects(struct shrinker *shrinker,
  1004					    struct shrink_control *sc)
  1005	{
  1006		struct drm_gem_shmem_shrinker *shmem_shrinker;
  1007		unsigned long nr_to_scan = sc->nr_to_scan;
  1008		unsigned long remaining = 0;
  1009		unsigned long freed = 0;
  1010	
  1011		shmem_shrinker = to_drm_gem_shmem_shrinker(shrinker);
  1012	
  1013		/* purge as many objects as we can */
  1014		freed += drm_gem_lru_scan(&shmem_shrinker->lru_evictable,
  1015					  nr_to_scan, &remaining,
> 1016					  drm_gem_shmem_shrinker_purge);
  1017	
  1018		/* evict as many objects as we can */
  1019		if (freed < nr_to_scan)
  1020			freed += drm_gem_lru_scan(&shmem_shrinker->lru_evictable,
  1021						  nr_to_scan - freed, &remaining,
  1022						  drm_gem_shmem_shrinker_evict);
  1023	
  1024		return (freed > 0 && remaining > 0) ? freed : SHRINK_STOP;
  1025	}
  1026	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux