mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:24:39 +01:00
mm/damon/paddr: initialize 'folio' variables to NULL for clarity
In damon_pa_mark_accessed_or_deactivate(), damon_pa_pageout(), damon_pa_migrate(), and damon_pa_stat(), the local variable 'folio' is declared but not initialized. Initialize 'folio' to NULL to improve code readability and maintainability. Link: https://patch.msgid.link/20260104013255.16962-1-yangqixiao@inspur.com Link: https://lkml.kernel.org/r/20260108013041.80601-1-sj@kernel.org Signed-off-by: Aaron Yang <yangqixiao@inspur.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
19c4707b53
commit
35520a712f
1 changed files with 4 additions and 4 deletions
|
|
@ -156,7 +156,7 @@ static unsigned long damon_pa_pageout(struct damon_region *r,
|
|||
LIST_HEAD(folio_list);
|
||||
bool install_young_filter = true;
|
||||
struct damos_filter *filter;
|
||||
struct folio *folio;
|
||||
struct folio *folio = NULL;
|
||||
|
||||
/* check access in page level again by default */
|
||||
damos_for_each_ops_filter(filter, s) {
|
||||
|
|
@ -212,7 +212,7 @@ static inline unsigned long damon_pa_mark_accessed_or_deactivate(
|
|||
unsigned long *sz_filter_passed)
|
||||
{
|
||||
phys_addr_t addr, applied = 0;
|
||||
struct folio *folio;
|
||||
struct folio *folio = NULL;
|
||||
|
||||
addr = damon_pa_phys_addr(r->ar.start, addr_unit);
|
||||
while (addr < damon_pa_phys_addr(r->ar.end, addr_unit)) {
|
||||
|
|
@ -262,7 +262,7 @@ static unsigned long damon_pa_migrate(struct damon_region *r,
|
|||
{
|
||||
phys_addr_t addr, applied;
|
||||
LIST_HEAD(folio_list);
|
||||
struct folio *folio;
|
||||
struct folio *folio = NULL;
|
||||
|
||||
addr = damon_pa_phys_addr(r->ar.start, addr_unit);
|
||||
while (addr < damon_pa_phys_addr(r->ar.end, addr_unit)) {
|
||||
|
|
@ -295,7 +295,7 @@ static unsigned long damon_pa_stat(struct damon_region *r,
|
|||
unsigned long *sz_filter_passed)
|
||||
{
|
||||
phys_addr_t addr;
|
||||
struct folio *folio;
|
||||
struct folio *folio = NULL;
|
||||
|
||||
if (!damos_ops_has_filter(s))
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue