Re: [PATCH v3] mm: slub: move sysfs slab alloc/free interfaces to debugfs

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

 



Hi Faiyaz,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.12-rc6]
[cannot apply to hnaz-linux-mm/master next-20210406]
[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]

url:    https://github.com/0day-ci/linux/commits/Faiyaz-Mohammed/mm-slub-move-sysfs-slab-alloc-free-interfaces-to-debugfs/20210406-202954
base:    e49d033bddf5b565044e2abe4241353959bc9120
config: sh-randconfig-c024-20210406 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/00c0bfb05271bdd3e80f4e9c62da9ce5287b8f93
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Faiyaz-Mohammed/mm-slub-move-sysfs-slab-alloc-free-interfaces-to-debugfs/20210406-202954
        git checkout 00c0bfb05271bdd3e80f4e9c62da9ce5287b8f93
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:16,
                    from include/asm-generic/bug.h:20,
                    from arch/sh/include/asm/bug.h:112,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/slub.c:13:
>> mm/slub.c:5869:12: error: initialization of 'initcall_t' {aka 'int (*)(void)'} from incompatible pointer type 'void (*)(void)' [-Werror=incompatible-pointer-types]
    5869 | __initcall(slab_debugfs_init);
         |            ^~~~~~~~~~~~~~~~~
   include/linux/init.h:249:41: note: in definition of macro '____define_initcall'
     249 |   __attribute__((__section__(__sec))) = fn;
         |                                         ^~
   include/linux/init.h:259:2: note: in expansion of macro '__unique_initcall'
     259 |  __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |  ^~~~~~~~~~~~~~~~~
   include/linux/init.h:261:35: note: in expansion of macro '___define_initcall'
     261 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/init.h:290:30: note: in expansion of macro '__define_initcall'
     290 | #define device_initcall(fn)  __define_initcall(fn, 6)
         |                              ^~~~~~~~~~~~~~~~~
   include/linux/init.h:295:24: note: in expansion of macro 'device_initcall'
     295 | #define __initcall(fn) device_initcall(fn)
         |                        ^~~~~~~~~~~~~~~
   mm/slub.c:5869:1: note: in expansion of macro '__initcall'
    5869 | __initcall(slab_debugfs_init);
         | ^~~~~~~~~~
   cc1: some warnings being treated as errors


vim +5869 mm/slub.c

  5856	
  5857	static void __init slab_debugfs_init(void)
  5858	{
  5859		struct kmem_cache *s;
  5860	
  5861		slab_debugfs_root = debugfs_create_dir("slab", NULL);
  5862		if (!IS_ERR(slab_debugfs_root))
  5863			list_for_each_entry(s, &slab_caches, list)
  5864				debugfs_slab_add(s);
  5865		else
  5866			pr_err("Cannot create slab debugfs.\n");
  5867	
  5868	}
> 5869	__initcall(slab_debugfs_init);
  5870	#endif
  5871	/*
  5872	 * The /proc/slabinfo ABI
  5873	 */
  5874	#ifdef CONFIG_SLUB_DEBUG
  5875	void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
  5876	{
  5877		unsigned long nr_slabs = 0;
  5878		unsigned long nr_objs = 0;
  5879		unsigned long nr_free = 0;
  5880		int node;
  5881		struct kmem_cache_node *n;
  5882	
  5883		for_each_kmem_cache_node(s, node, n) {
  5884			nr_slabs += node_nr_slabs(n);
  5885			nr_objs += node_nr_objs(n);
  5886			nr_free += count_partial(n, count_free);
  5887		}
  5888	
  5889		sinfo->active_objs = nr_objs - nr_free;
  5890		sinfo->num_objs = nr_objs;
  5891		sinfo->active_slabs = nr_slabs;
  5892		sinfo->num_slabs = nr_slabs;
  5893		sinfo->objects_per_slab = oo_objects(s->oo);
  5894		sinfo->cache_order = oo_order(s->oo);
  5895	}
  5896	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux