]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mm/damon/core: mark damon_moving_sum() as a static function
authorSeongJae Park <sj@kernel.org>
Fri, 15 Sep 2023 02:52:51 +0000 (02:52 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:30 +0000 (10:32 -0700)
The function is used by only mm/damon/core.c.  Mark it as a static
function.

Link: https://lkml.kernel.org/r/20230915025251.72816-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/damon.h
mm/damon/core.c

index 0fe13482df6335072341c9464c65dcd378dc3f5e..491fdd3e4c7645b494f9cfbb63fbddd929cd122b 100644 (file)
@@ -632,8 +632,6 @@ void damon_add_region(struct damon_region *r, struct damon_target *t);
 void damon_destroy_region(struct damon_region *r, struct damon_target *t);
 int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges,
                unsigned int nr_ranges);
-unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum,
-               unsigned int len_window, unsigned int new_value);
 void damon_update_region_access_rate(struct damon_region *r, bool accessed,
                struct damon_attrs *attrs);
 
index 45cc108c0fe1701d1014039e5cbd6c477b452f34..b15cf47d2d29c7692df2df10965c234b8e72fbce 100644 (file)
@@ -1587,7 +1587,7 @@ int damon_set_region_biggest_system_ram_default(struct damon_target *t,
  *
  * Return: Pseudo-moving average after getting the @new_value.
  */
-unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum,
+static unsigned int damon_moving_sum(unsigned int mvsum, unsigned int nomvsum,
                unsigned int len_window, unsigned int new_value)
 {
        return mvsum - nomvsum / len_window + new_value;