[hnaz-linux-mm:master 80/408] include/linux/memcontrol.h:863:9: warning: 'return' with a value, in function returning void

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

 



tree:   https://github.com/hnaz/linux-mm master
head:   52eaf754e07cae946b8010a40ed2ac26128e1967
commit: e3ee1a4e054fd2bb4e8d5a6e1c5db700b488acd5 [80/408] mm, memcg: decouple e{low,min} state mutations from protection checks
config: sh-rsk7269_defconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e3ee1a4e054fd2bb4e8d5a6e1c5db700b488acd5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

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

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/sh/kernel/asm-offsets.c:16:
   include/linux/memcontrol.h: In function 'mem_cgroup_protection':
   include/linux/memcontrol.h:855:20: error: invalid storage class for function 'mem_cgroup_calculate_protection'
     855 | static inline void mem_cgroup_calculate_protection(struct mem_cgroup *root,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:860:20: error: invalid storage class for function 'mem_cgroup_protection'
     860 | static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
         |                    ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h: In function 'mem_cgroup_protection':
>> include/linux/memcontrol.h:863:9: warning: 'return' with a value, in function returning void [-Wreturn-type]
     863 |  return 0;
         |         ^
   include/linux/memcontrol.h:860:20: note: declared here
     860 | static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
         |                    ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h: In function 'mem_cgroup_protection':
>> include/linux/memcontrol.h:860:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     860 | static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
         | ^~~~~~
   include/linux/memcontrol.h:866:20: error: invalid storage class for function 'mem_cgroup_below_low'
     866 | static inline bool mem_cgroup_below_low(struct mem_cgroup *memcg)
         |                    ^~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:871:20: error: invalid storage class for function 'mem_cgroup_below_min'
     871 | static inline bool mem_cgroup_below_min(struct mem_cgroup *memcg)
         |                    ^~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:876:19: error: invalid storage class for function 'mem_cgroup_try_charge'
     876 | static inline int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm,
         |                   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:885:19: error: invalid storage class for function 'mem_cgroup_try_charge_delay'
     885 | static inline int mem_cgroup_try_charge_delay(struct page *page,
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:895:20: error: invalid storage class for function 'mem_cgroup_commit_charge'
     895 | static inline void mem_cgroup_commit_charge(struct page *page,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:901:20: error: invalid storage class for function 'mem_cgroup_cancel_charge'
     901 | static inline void mem_cgroup_cancel_charge(struct page *page,
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:907:20: error: invalid storage class for function 'mem_cgroup_uncharge'
     907 | static inline void mem_cgroup_uncharge(struct page *page)
         |                    ^~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:911:20: error: invalid storage class for function 'mem_cgroup_uncharge_list'
     911 | static inline void mem_cgroup_uncharge_list(struct list_head *page_list)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:915:20: error: invalid storage class for function 'mem_cgroup_migrate'
     915 | static inline void mem_cgroup_migrate(struct page *old, struct page *new)
         |                    ^~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:919:30: error: invalid storage class for function 'mem_cgroup_lruvec'
     919 | static inline struct lruvec *mem_cgroup_lruvec(struct mem_cgroup *memcg,
         |                              ^~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:925:30: error: invalid storage class for function 'mem_cgroup_page_lruvec'
     925 | static inline struct lruvec *mem_cgroup_page_lruvec(struct page *page,
         |                              ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:931:34: error: invalid storage class for function 'parent_mem_cgroup'
     931 | static inline struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg)
         |                                  ^~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:936:20: error: invalid storage class for function 'mm_match_cgroup'
     936 | static inline bool mm_match_cgroup(struct mm_struct *mm,
         |                    ^~~~~~~~~~~~~~~
   include/linux/memcontrol.h:942:34: error: invalid storage class for function 'get_mem_cgroup_from_mm'
     942 | static inline struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
         |                                  ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:947:34: error: invalid storage class for function 'get_mem_cgroup_from_page'
     947 | static inline struct mem_cgroup *get_mem_cgroup_from_page(struct page *page)
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:952:20: error: invalid storage class for function 'mem_cgroup_put'
     952 | static inline void mem_cgroup_put(struct mem_cgroup *memcg)
         |                    ^~~~~~~~~~~~~~
   include/linux/memcontrol.h:957:1: error: invalid storage class for function 'mem_cgroup_iter'
     957 | mem_cgroup_iter(struct mem_cgroup *root,
         | ^~~~~~~~~~~~~~~
   include/linux/memcontrol.h:964:20: error: invalid storage class for function 'mem_cgroup_iter_break'
     964 | static inline void mem_cgroup_iter_break(struct mem_cgroup *root,
         |                    ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:969:19: error: invalid storage class for function 'mem_cgroup_scan_tasks'
     969 | static inline int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
         |                   ^~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:975:30: error: invalid storage class for function 'mem_cgroup_id'
     975 | static inline unsigned short mem_cgroup_id(struct mem_cgroup *memcg)
         |                              ^~~~~~~~~~~~~
   include/linux/memcontrol.h:980:34: error: invalid storage class for function 'mem_cgroup_from_id'
     980 | static inline struct mem_cgroup *mem_cgroup_from_id(unsigned short id)
         |                                  ^~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:987:34: error: invalid storage class for function 'mem_cgroup_from_seq'
     987 | static inline struct mem_cgroup *mem_cgroup_from_seq(struct seq_file *m)
         |                                  ^~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:992:34: error: invalid storage class for function 'lruvec_memcg'
     992 | static inline struct mem_cgroup *lruvec_memcg(struct lruvec *lruvec)
         |                                  ^~~~~~~~~~~~
   include/linux/memcontrol.h:997:20: error: invalid storage class for function 'mem_cgroup_online'
     997 | static inline bool mem_cgroup_online(struct mem_cgroup *memcg)
         |                    ^~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1003:15: error: invalid storage class for function 'mem_cgroup_get_zone_lru_size'
    1003 | unsigned long mem_cgroup_get_zone_lru_size(struct lruvec *lruvec,
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1009:29: error: invalid storage class for function 'mem_cgroup_get_max'
    1009 | static inline unsigned long mem_cgroup_get_max(struct mem_cgroup *memcg)
         |                             ^~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1014:29: error: invalid storage class for function 'mem_cgroup_size'
    1014 | static inline unsigned long mem_cgroup_size(struct mem_cgroup *memcg)
         |                             ^~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1020:1: error: invalid storage class for function 'mem_cgroup_print_oom_context'
    1020 | mem_cgroup_print_oom_context(struct mem_cgroup *memcg, struct task_struct *p)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1025:1: error: invalid storage class for function 'mem_cgroup_print_oom_meminfo'
    1025 | mem_cgroup_print_oom_meminfo(struct mem_cgroup *memcg)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1029:34: error: invalid storage class for function 'lock_page_memcg'
    1029 | static inline struct mem_cgroup *lock_page_memcg(struct page *page)
         |                                  ^~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1034:20: error: invalid storage class for function '__unlock_page_memcg'
    1034 | static inline void __unlock_page_memcg(struct mem_cgroup *memcg)
         |                    ^~~~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1038:20: error: invalid storage class for function 'unlock_page_memcg'
    1038 | static inline void unlock_page_memcg(struct page *page)
         |                    ^~~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:1042:20: error: invalid storage class for function 'mem_cgroup_handle_over_high'
    1042 | static inline void mem_cgroup_handle_over_high(void)
--
   include/linux/suspend.h:336:20: error: invalid storage class for function 'pm_suspend_clear_flags'
     336 | static inline void pm_suspend_clear_flags(void) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:337:20: error: invalid storage class for function 'pm_set_suspend_via_firmware'
     337 | static inline void pm_set_suspend_via_firmware(void) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:338:20: error: invalid storage class for function 'pm_set_resume_via_firmware'
     338 | static inline void pm_set_resume_via_firmware(void) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:339:20: error: invalid storage class for function 'pm_suspend_via_firmware'
     339 | static inline bool pm_suspend_via_firmware(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:340:20: error: invalid storage class for function 'pm_resume_via_firmware'
     340 | static inline bool pm_resume_via_firmware(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:341:20: error: invalid storage class for function 'pm_suspend_no_platform'
     341 | static inline bool pm_suspend_no_platform(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:342:20: error: invalid storage class for function 'pm_suspend_default_s2idle'
     342 | static inline bool pm_suspend_default_s2idle(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:344:20: error: invalid storage class for function 'suspend_set_ops'
     344 | static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {}
         |                    ^~~~~~~~~~~~~~~
   include/linux/suspend.h:345:19: error: invalid storage class for function 'pm_suspend'
     345 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
         |                   ^~~~~~~~~~
   include/linux/suspend.h:346:20: error: invalid storage class for function 'sync_on_suspend_enabled'
     346 | static inline bool sync_on_suspend_enabled(void) { return true; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:347:20: error: invalid storage class for function 'idle_should_enter_s2idle'
     347 | static inline bool idle_should_enter_s2idle(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:348:27: error: invalid storage class for function 'pm_states_init'
     348 | static inline void __init pm_states_init(void) {}
         |                           ^~~~~~~~~~~~~~
   include/linux/suspend.h:349:20: error: invalid storage class for function 's2idle_set_ops'
     349 | static inline void s2idle_set_ops(const struct platform_s2idle_ops *ops) {}
         |                    ^~~~~~~~~~~~~~
   include/linux/suspend.h:350:20: error: invalid storage class for function 's2idle_wake'
     350 | static inline void s2idle_wake(void) {}
         |                    ^~~~~~~~~~~
   include/linux/suspend.h:457:20: error: invalid storage class for function 'register_nosave_region'
     457 | static inline void register_nosave_region(unsigned long b, unsigned long e) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:458:20: error: invalid storage class for function 'register_nosave_region_late'
     458 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:459:19: error: invalid storage class for function 'swsusp_page_is_forbidden'
     459 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:460:20: error: invalid storage class for function 'swsusp_set_page_free'
     460 | static inline void swsusp_set_page_free(struct page *p) {}
         |                    ^~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:461:20: error: invalid storage class for function 'swsusp_unset_page_free'
     461 | static inline void swsusp_unset_page_free(struct page *p) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:463:20: error: invalid storage class for function 'hibernation_set_ops'
     463 | static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {}
         |                    ^~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:464:19: error: invalid storage class for function 'hibernate'
     464 | static inline int hibernate(void) { return -ENOSYS; }
         |                   ^~~~~~~~~
   include/linux/suspend.h:465:20: error: invalid storage class for function 'system_entering_hibernation'
     465 | static inline bool system_entering_hibernation(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:466:20: error: invalid storage class for function 'hibernation_available'
     466 | static inline bool hibernation_available(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:514:19: error: invalid storage class for function 'register_pm_notifier'
     514 | static inline int register_pm_notifier(struct notifier_block *nb)
         |                   ^~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:519:19: error: invalid storage class for function 'unregister_pm_notifier'
     519 | static inline int unregister_pm_notifier(struct notifier_block *nb)
         |                   ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:524:20: error: invalid storage class for function 'ksys_sync_helper'
     524 | static inline void ksys_sync_helper(void) {}
         |                    ^~~~~~~~~~~~~~~~
   include/linux/suspend.h:528:20: error: invalid storage class for function 'pm_wakeup_pending'
     528 | static inline bool pm_wakeup_pending(void) { return false; }
         |                    ^~~~~~~~~~~~~~~~~
   include/linux/suspend.h:529:20: error: invalid storage class for function 'pm_system_wakeup'
     529 | static inline void pm_system_wakeup(void) {}
         |                    ^~~~~~~~~~~~~~~~
   include/linux/suspend.h:530:20: error: invalid storage class for function 'pm_wakeup_clear'
     530 | static inline void pm_wakeup_clear(bool reset) {}
         |                    ^~~~~~~~~~~~~~~
   include/linux/suspend.h:531:20: error: invalid storage class for function 'pm_system_irq_wakeup'
     531 | static inline void pm_system_irq_wakeup(unsigned int irq_number) {}
         |                    ^~~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:533:20: error: invalid storage class for function 'lock_system_sleep'
     533 | static inline void lock_system_sleep(void) {}
         |                    ^~~~~~~~~~~~~~~~~
   include/linux/suspend.h:534:20: error: invalid storage class for function 'unlock_system_sleep'
     534 | static inline void unlock_system_sleep(void) {}
         |                    ^~~~~~~~~~~~~~~~~~~
   include/linux/suspend.h:565:20: error: invalid storage class for function 'queue_up_suspend_work'
     565 | static inline void queue_up_suspend_work(void) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~
   In file included from arch/sh/kernel/asm-offsets.c:19:
>> arch/sh/include/asm/suspend.h:20:19: error: invalid storage class for function 'sh_mobile_setup_cpuidle'
      20 | static inline int sh_mobile_setup_cpuidle(void) { return 0; }
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/sh/kernel/asm-offsets.c:60:1: error: expected declaration or statement at end of input
      60 | }
         | ^
   In file included from arch/sh/kernel/asm-offsets.c:19:
   arch/sh/include/asm/suspend.h:84:22: warning: unused variable 'sh_mobile_sleep_supported' [-Wunused-variable]
      84 | extern unsigned long sh_mobile_sleep_supported;
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/sh/include/asm/suspend.h:25:36: warning: unused variable 'sh_mobile_post_sleep_notifier_list' [-Wunused-variable]
      25 | extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list;
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/sh/include/asm/suspend.h:24:36: warning: unused variable 'sh_mobile_pre_sleep_notifier_list' [-Wunused-variable]
      24 | extern struct atomic_notifier_head sh_mobile_pre_sleep_notifier_list;
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/sh/kernel/asm-offsets.c:16:
   include/linux/suspend.h:477:21: warning: unused variable 'system_transition_mutex' [-Wunused-variable]
     477 | extern struct mutex system_transition_mutex;
         |                     ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/suspend.h:5,
                    from arch/sh/kernel/asm-offsets.c:16:
   include/linux/swap.h:366:22: warning: unused variable 'vm_total_pages' [-Wunused-variable]
     366 | extern unsigned long vm_total_pages;
         |                      ^~~~~~~~~~~~~~
   include/linux/swap.h:322:22: warning: unused variable 'totalreserve_pages' [-Wunused-variable]
     322 | extern unsigned long totalreserve_pages;
         |                      ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/swap.h:11,
                    from include/linux/suspend.h:5,
                    from arch/sh/kernel/asm-offsets.c:16:
   include/linux/node.h:98:21: warning: unused variable 'node_devices' [-Wunused-variable]
      98 | extern struct node *node_devices[];
         |                     ^~~~~~~~~~~~
>> arch/sh/kernel/asm-offsets.c:60:1: warning: no return statement in function returning non-void [-Wreturn-type]
      60 | }
         | ^
   At top level:
   arch/sh/kernel/asm-offsets.c:21:5: warning: 'main' defined but not used [-Wunused-function]
      21 | int main(void)
         |     ^~~~
   make[2]: *** [scripts/Makefile.build:100: arch/sh/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1141: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:180: sub-make] Error 2

vim +/return +863 include/linux/memcontrol.h

e3ee1a4e054fd2b Chris Down 2020-04-29  853  
e3ee1a4e054fd2b Chris Down 2020-04-29  854  
e3ee1a4e054fd2b Chris Down 2020-04-29 @855  static inline void mem_cgroup_calculate_protection(struct mem_cgroup *root,
e3ee1a4e054fd2b Chris Down 2020-04-29  856  						   struct mem_cgroup *memcg);
e3ee1a4e054fd2b Chris Down 2020-04-29  857  {
e3ee1a4e054fd2b Chris Down 2020-04-29  858  }
e3ee1a4e054fd2b Chris Down 2020-04-29  859  
e3ee1a4e054fd2b Chris Down 2020-04-29 @860  static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
e3ee1a4e054fd2b Chris Down 2020-04-29  861  					 bool in_low_reclaim)
e3ee1a4e054fd2b Chris Down 2020-04-29  862  {
1bc63fb1272be07 Chris Down 2019-10-06 @863  	return 0;
9783aa9917f8ae2 Chris Down 2019-10-06  864  }
9783aa9917f8ae2 Chris Down 2019-10-06  865  

:::::: The code at line 863 was first introduced by commit
:::::: 1bc63fb1272be0773e925f78c0fbd06c89701d55 mm, memcg: make scan aggression always exclude protection

:::::: TO: Chris Down <chris@xxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
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