[linux-next:master 11901/11991] mm/huge_memory.c:604:16: error: invalid storage class for function 'khugepaged_max_ptes_swap_show'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   66c198deda3725c57939c6cdaf2c9f5375cd79ad
commit: ca9c8b6c0b78b9d5b1e6569f02b25f852a99d444 [11901/11991] mm: make optimistic check for swapin readahead
config: i386-randconfig-h1-05241552 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout ca9c8b6c0b78b9d5b1e6569f02b25f852a99d444
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

               ^
   include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
     .show = _name##_show,      \
             ^~~~~
   mm/huge_memory.c:543:12: note: (near initialization for 'pages_collapsed_attr.show')
     __ATTR_RO(pages_collapsed);
               ^
   include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
     .show = _name##_show,      \
             ^~~~~
   mm/huge_memory.c:545:16: error: invalid storage class for function 'full_scans_show'
    static ssize_t full_scans_show(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~
   In file included from include/linux/kobject.h:21:0,
                    from include/linux/device.h:17,
                    from include/linux/node.h:17,
                    from include/linux/swap.h:10,
                    from mm/huge_memory.c:16:
   mm/huge_memory.c:552:12: error: initializer element is not constant
     __ATTR_RO(full_scans);
               ^
   include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
     .show = _name##_show,      \
             ^~~~~
   mm/huge_memory.c:552:12: note: (near initialization for 'full_scans_attr.show')
     __ATTR_RO(full_scans);
               ^
   include/linux/sysfs.h:116:10: note: in definition of macro '__ATTR_RO'
     .show = _name##_show,      \
             ^~~~~
   mm/huge_memory.c:554:16: error: invalid storage class for function 'khugepaged_defrag_show'
    static ssize_t khugepaged_defrag_show(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:560:16: error: invalid storage class for function 'khugepaged_defrag_store'
    static ssize_t khugepaged_defrag_store(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kobject.h:21:0,
                    from include/linux/device.h:17,
                    from include/linux/node.h:17,
                    from include/linux/swap.h:10,
                    from mm/huge_memory.c:16:
   mm/huge_memory.c:568:23: error: initializer element is not constant
     __ATTR(defrag, 0644, khugepaged_defrag_show,
                          ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:568:23: note: (near initialization for 'khugepaged_defrag_attr.show')
     __ATTR(defrag, 0644, khugepaged_defrag_show,
                          ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:569:9: error: initializer element is not constant
            khugepaged_defrag_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
   mm/huge_memory.c:569:9: note: (near initialization for 'khugepaged_defrag_attr.store')
            khugepaged_defrag_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
   mm/huge_memory.c:579:16: error: invalid storage class for function 'khugepaged_max_ptes_none_show'
    static ssize_t khugepaged_max_ptes_none_show(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:585:16: error: invalid storage class for function 'khugepaged_max_ptes_none_store'
    static ssize_t khugepaged_max_ptes_none_store(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kobject.h:21:0,
                    from include/linux/device.h:17,
                    from include/linux/node.h:17,
                    from include/linux/swap.h:10,
                    from mm/huge_memory.c:16:
   mm/huge_memory.c:601:30: error: initializer element is not constant
     __ATTR(max_ptes_none, 0644, khugepaged_max_ptes_none_show,
                                 ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:601:30: note: (near initialization for 'khugepaged_max_ptes_none_attr.show')
     __ATTR(max_ptes_none, 0644, khugepaged_max_ptes_none_show,
                                 ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:602:9: error: initializer element is not constant
            khugepaged_max_ptes_none_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
   mm/huge_memory.c:602:9: note: (near initialization for 'khugepaged_max_ptes_none_attr.store')
            khugepaged_max_ptes_none_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
>> mm/huge_memory.c:604:16: error: invalid storage class for function 'khugepaged_max_ptes_swap_show'
    static ssize_t khugepaged_max_ptes_swap_show(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/huge_memory.c:611:16: error: invalid storage class for function 'khugepaged_max_ptes_swap_store'
    static ssize_t khugepaged_max_ptes_swap_store(struct kobject *kobj,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kobject.h:21:0,
                    from include/linux/device.h:17,
                    from include/linux/node.h:17,
                    from include/linux/swap.h:10,
                    from mm/huge_memory.c:16:
   mm/huge_memory.c:628:30: error: initializer element is not constant
     __ATTR(max_ptes_swap, 0644, khugepaged_max_ptes_swap_show,
                                 ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:628:30: note: (near initialization for 'khugepaged_max_ptes_swap_attr.show')
     __ATTR(max_ptes_swap, 0644, khugepaged_max_ptes_swap_show,
                                 ^
   include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
     .show = _show,      \
             ^~~~~
   mm/huge_memory.c:629:9: error: initializer element is not constant
            khugepaged_max_ptes_swap_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
   mm/huge_memory.c:629:9: note: (near initialization for 'khugepaged_max_ptes_swap_attr.store')
            khugepaged_max_ptes_swap_store);
            ^
   include/linux/sysfs.h:104:11: note: in definition of macro '__ATTR'
     .store = _store,      \
              ^~~~~~
   mm/huge_memory.c:643:15: error: variable 'khugepaged_attr_group' has initializer but incomplete type
    static struct attribute_group khugepaged_attr_group = {
                  ^~~~~~~~~~~~~~~
   mm/huge_memory.c:644:2: error: unknown field 'attrs' specified in initializer
     .attrs = khugepaged_attr,
     ^
   mm/huge_memory.c:644:11: warning: excess elements in struct initializer
     .attrs = khugepaged_attr,
              ^~~~~~~~~~~~~~~
   mm/huge_memory.c:644:11: note: (near initialization for 'khugepaged_attr_group')
   mm/huge_memory.c:645:2: error: unknown field 'name' specified in initializer
     .name = "khugepaged",
     ^
   mm/huge_memory.c:645:10: warning: excess elements in struct initializer
     .name = "khugepaged",
             ^~~~~~~~~~~~
   mm/huge_memory.c:645:10: note: (near initialization for 'khugepaged_attr_group')
   mm/huge_memory.c:643:31: error: storage size of 'khugepaged_attr_group' isn't known
    static struct attribute_group khugepaged_attr_group = {
                                  ^~~~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:648:19: error: invalid storage class for function 'hugepage_init_sysfs'
    static int __init hugepage_init_sysfs(struct kobject **hugepage_kobj)
                      ^~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:679:20: error: invalid storage class for function 'hugepage_exit_sysfs'
    static void __init hugepage_exit_sysfs(struct kobject *hugepage_kobj)
                       ^~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:696:19: error: invalid storage class for function 'hugepage_init'
    static int __init hugepage_init(void)
                      ^~~~~~~~~~~~~
   mm/huge_memory.c: In function 'hugepage_init':
   mm/huge_memory.c:722:8: error: implicit declaration of function 'khugepaged_slab_init' [-Werror=implicit-function-declaration]
     err = khugepaged_slab_init();
           ^~~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:753:2: error: implicit declaration of function 'khugepaged_slab_exit' [-Werror=implicit-function-declaration]
     khugepaged_slab_exit();
     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:5:0,
                    from include/linux/kernel.h:13,
                    from include/asm-generic/bug.h:13,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from mm/huge_memory.c:10:
   mm/huge_memory.c: In function 'page_is_young':
   mm/huge_memory.c:759:17: error: initializer element is not constant
    subsys_initcall(hugepage_init);
                    ^
   include/linux/init.h:188:58: note: in definition of macro '__define_initcall'
     __attribute__((__section__(".initcall" #id ".init"))) = fn; \
                                                             ^~
   mm/huge_memory.c:759:1: note: in expansion of macro 'subsys_initcall'
    subsys_initcall(hugepage_init);
    ^~~~~~~~~~~~~~~
   mm/huge_memory.c:761:19: error: invalid storage class for function 'setup_transparent_hugepage'
    static int __init setup_transparent_hugepage(char *str)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/huge_memory.c:761:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    static int __init setup_transparent_hugepage(char *str)
    ^~~~~~
   In file included from include/linux/printk.h:5:0,
                    from include/linux/kernel.h:13,
                    from include/asm-generic/bug.h:13,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/mmdebug.h:4,
                    from include/linux/mm.h:8,
                    from mm/huge_memory.c:10:
   mm/huge_memory.c:790:34: error: initializer element is not constant

vim +/khugepaged_max_ptes_swap_show +604 mm/huge_memory.c

   596		khugepaged_max_ptes_none = max_ptes_none;
   597	
   598		return count;
   599	}
   600	static struct kobj_attribute khugepaged_max_ptes_none_attr =
   601		__ATTR(max_ptes_none, 0644, khugepaged_max_ptes_none_show,
 > 602		       khugepaged_max_ptes_none_store);
   603	
 > 604	static ssize_t khugepaged_max_ptes_swap_show(struct kobject *kobj,
   605						     struct kobj_attribute *attr,
   606						     char *buf)
   607	{
   608		return sprintf(buf, "%u\n", khugepaged_max_ptes_swap);
   609	}
   610	
 > 611	static ssize_t khugepaged_max_ptes_swap_store(struct kobject *kobj,
   612						      struct kobj_attribute *attr,
   613						      const char *buf, size_t count)
   614	{

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


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