From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 1814/2356] mm/page_cache_limit.c:94:5: warning: no previous prototype for function 'cache_limit_mbytes_sysctl_handler'
Date: Fri, 12 Jan 2024 08:27:03 +0800 [thread overview]
Message-ID: <202401120819.78yCuGth-lkp@intel.com> (raw)
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: ea6de9f6732d495c506f9c140b4ec17c957e1b77
commit: 7d1031b36ebd6c273d9aad316fd9e3e2daa01a85 [1814/2356] mm: support pagecache limit
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240112/202401120819.78yCuGth-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240112/202401120819.78yCuGth-lkp@intel.com/reproduce)
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/202401120819.78yCuGth-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/page_cache_limit.c:61:5: warning: no previous prototype for function 'cache_reclaim_enable_handler' [-Wmissing-prototypes]
61 | int cache_reclaim_enable_handler(struct ctl_table *table, int write,
| ^
mm/page_cache_limit.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
61 | int cache_reclaim_enable_handler(struct ctl_table *table, int write,
| ^
| static
mm/page_cache_limit.c:77:5: warning: no previous prototype for function 'cache_reclaim_sysctl_handler' [-Wmissing-prototypes]
77 | int cache_reclaim_sysctl_handler(struct ctl_table *table, int write,
| ^
mm/page_cache_limit.c:77:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
77 | int cache_reclaim_sysctl_handler(struct ctl_table *table, int write,
| ^
| static
>> mm/page_cache_limit.c:94:5: warning: no previous prototype for function 'cache_limit_mbytes_sysctl_handler' [-Wmissing-prototypes]
94 | int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write,
| ^
mm/page_cache_limit.c:94:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
94 | int cache_limit_mbytes_sysctl_handler(struct ctl_table *table, int write,
| ^
| static
3 warnings generated.
vim +/cache_limit_mbytes_sysctl_handler +94 mm/page_cache_limit.c
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
reply other threads:[~2024-01-12 0:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202401120819.78yCuGth-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.