[openeuler:OLK-6.6 2304/2304] mm/page_cache_limit.c:94:5: warning: no previous prototype for 'cache_limit_mbytes_sysctl_handler'

Hi Ze, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 35c5792a71f249ce79eba3cbb546d1ece7c4f3ee commit: 7d1031b36ebd6c273d9aad316fd9e3e2daa01a85 [2304/2304] mm: support pagecache limit config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250528/202505280023.4g7q598y-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505280023.4g7q598y-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505280023.4g7q598y-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/page_cache_limit.c:61:5: warning: no previous prototype for 'cache_reclaim_enable_handler' [-Wmissing-prototypes] 61 | int cache_reclaim_enable_handler(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_cache_limit.c:77:5: warning: no previous prototype for 'cache_reclaim_sysctl_handler' [-Wmissing-prototypes] 77 | int cache_reclaim_sysctl_handler(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/page_cache_limit.c:94:5: warning: no previous prototype for 'cache_limit_mbytes_sysctl_handler' [-Wmissing-prototypes] 94 | int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cache_limit_mbytes_sysctl_handler +94 mm/page_cache_limit.c 60
61 int cache_reclaim_enable_handler(struct ctl_table *table, int write, 62 void *buffer, size_t *length, loff_t *ppos) 63 { 64 int ret; 65 66 ret = proc_dointvec_minmax(table, write, buffer, length, ppos); 67 if (ret || !write) 68 return ret; 69 70 if (should_periodical_reclaim()) 71 schedule_delayed_work(&shepherd, round_jiffies_relative( 72 (unsigned long)vm_cache_reclaim_s * HZ)); 73 74 return 0; 75 } 76 77 int cache_reclaim_sysctl_handler(struct ctl_table *table, int write, 78 void *buffer, size_t *length, loff_t *ppos) 79 { 80 int ret; 81 82 ret = proc_dointvec_minmax(table, write, buffer, length, ppos); 83 if (ret || !write) 84 return ret; 85 86 if (should_periodical_reclaim()) 87 mod_delayed_work(system_unbound_wq, &shepherd, 88 round_jiffies_relative( 89 (unsigned long)vm_cache_reclaim_s * HZ)); 90 91 return ret; 92 } 93 94 int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write, 95 void __user *buffer, size_t *length, loff_t *ppos) 96 { 97 int ret; 98 unsigned long vm_cache_limit_mbytes_max; 99 unsigned long origin_mbytes = vm_cache_limit_mbytes; 100 int nr_retries = MAX_RECLAIM_RETRIES; 101 102 vm_cache_limit_mbytes_max = totalram_pages() >> (20 - PAGE_SHIFT); 103 ret = proc_doulongvec_minmax(table, write, buffer, length, ppos); 104 if (ret || !write) 105 return ret; 106 107 if (vm_cache_limit_mbytes > vm_cache_limit_mbytes_max) { 108 vm_cache_limit_mbytes = origin_mbytes; 109 return -EINVAL; 110 } 111 112 if (write) { 113 while (should_reclaim_page_cache() && page_cache_over_limit() && 114 nr_retries--) { 115 if (signal_pending(current)) 116 return -EINTR; 117 118 shrink_memory(node_reclaim_num(), false); 119 } 120 } 121 122 return 0; 123 } 124
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot