mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
UPSTREAM: mm/damon/vaddr: constify static mm_walk_ops
The only usage of these structs is to pass their addresses to
walk_page_range(), which takes a pointer to const mm_walk_ops as
argument. Make them const to allow the compiler to put them in
read-only memory.
Link: https://lkml.kernel.org/r/20211014075042.17174-2-rikard.falkeborn@gmail.com
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 199b50f4c9)
Bug: 228223814
Signed-off-by: Hailong Tu <tuhailong@oppo.com>
Change-Id: Ib72d1a17a17377357a53b80cbafc13c456e71683
This commit is contained in:
committed by
Suren Baghdasaryan
parent
fd1bd69a67
commit
c525089abf
@@ -394,7 +394,7 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mm_walk_ops damon_mkold_ops = {
|
||||
static const struct mm_walk_ops damon_mkold_ops = {
|
||||
.pmd_entry = damon_mkold_pmd_entry,
|
||||
};
|
||||
|
||||
@@ -490,7 +490,7 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct mm_walk_ops damon_young_ops = {
|
||||
static const struct mm_walk_ops damon_young_ops = {
|
||||
.pmd_entry = damon_young_pmd_entry,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user