From: kernel test robot <lkp@intel.com>
To: SeongJae Park <sj@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [sj:damon/next 33/35] mm/damon/core.c:290:1: error: function declaration isn't a prototype
Date: Sun, 2 Jul 2023 00:55:44 +0800 [thread overview]
Message-ID: <202307020030.tSDmtlai-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head: b5a2d90d9d7d15714ca1dfb7bb74043ebd2a28d0
commit: 0389f4cef6f76094d3b2aed5bece0a4036dd859c [33/35] mm/damon/core: Implement moving_nr_accesses update function
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230702/202307020030.tSDmtlai-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230702/202307020030.tSDmtlai-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/202307020030.tSDmtlai-lkp@intel.com/
Note: the sj/damon/next HEAD b5a2d90d9d7d15714ca1dfb7bb74043ebd2a28d0 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
>> mm/damon/core.c:290:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
290 | static unsigned int damon_pseudo_moving_average_add(unsigned int current,
| ^~~~~~
mm/damon/core.c: In function 'damon_record_access_to_region':
>> mm/damon/core.c:320:25: error: 'max_nr_accesses' undeclared (first use in this function)
320 | max_nr_accesses);
| ^~~~~~~~~~~~~~~
mm/damon/core.c:320:25: note: each undeclared identifier is reported only once for each function it appears in
mm/damon/core.c:318:31: warning: passing argument 1 of 'damon_pseudo_moving_average_add' makes pointer from integer without a cast [-Wint-conversion]
318 | region->moving_accesses_bp,
| ~~~~~~^~~~~~~~~~~~~~~~~~~~
| |
| unsigned int
In file included from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from include/linux/memcontrol.h:13,
from include/linux/damon.h:11,
from mm/damon/core.c:10:
arch/x86/include/asm/current.h:44:17: note: expected 'unsigned int (*)()' but argument is of type 'unsigned int'
44 | #define current get_current()
mm/damon/core.c:290:66: note: in expansion of macro 'current'
290 | static unsigned int damon_pseudo_moving_average_add(unsigned int current,
| ^~~~~~~
cc1: some warnings being treated as errors
vim +290 mm/damon/core.c
276
277 /*
278 * damon_pseudo_moving_average_add() - Return pseudo-moving average value.
279 * @current: Current value of the pseudo moving average.
280 * @delta: New value that will be added to the pseudo moving average/
281 * @len_widnow: The length of the window of the moving average.
282 *
283 * Moving average is good for handling noise, but the cost of keeping the past
284 * window values can be high for arbitrary window size. This function
285 * implements lightweight pseudo moving average function, which doesn't keep
286 * the past window values, but assumes the there was no noise in the past.
287 *
288 * Return: Pseudo-moving average after getting the @delta.
289 */
> 290 static unsigned int damon_pseudo_moving_average_add(unsigned int current,
291 unsigned int delta, unsigned int len_window)
292 {
293 return current - current / len_window + delta;
294 }
295
296 /**
297 * damon_record_access_to_region() - Apply access finding for a region.
298 * @region: The DAMON region to update its access frequency.
299 * @accessed: Whether the region has accessed.
300 * @attrs: The monitoring attributes.
301 *
302 * Apply found access or idleness to a region by updating the access rate
303 * fields of the region. Normally called by underlying operations set to apply
304 * each of their access check results to a each region.
305 */
306 void damon_record_access_to_region(struct damon_region *region, bool accessed,
307 struct damon_attrs *attrs)
308 {
309 unsigned int len_window = 1;
310
311 /*
312 * sample_interval can be zero, but cannot be larger than
313 * aggr_interval, owing to validation of damon_set_attrs().
314 */
315 if (attrs->sample_interval)
316 len_window = attrs->aggr_interval / attrs->sample_interval;
317 region->moving_accesses_bp = damon_pseudo_moving_average_add(
318 region->moving_accesses_bp,
319 accessed ? 10000 / len_window : 0,
> 320 max_nr_accesses);
321
322 region->nr_accesses += accessed ? 1 : 0;
323 }
324
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-07-01 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-01 16:55 kernel test robot [this message]
2023-07-01 17:33 ` [sj:damon/next 33/35] mm/damon/core.c:290:1: error: function declaration isn't a prototype SeongJae Park
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=202307020030.tSDmtlai-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sj@kernel.org \
/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.