mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
mm/damon/ops-common: remove redundant local variable in damon_migrate_folio_list()
In damon_migrate_folio_list(), we're redeclaring folio inside the first while loop, but it just shadows the outer one. Since the second loop uses the outer folio anyway, the inner declaration is pointless. Remove it to consistently reuse the same variable throughout the function and improve readability. Link: https://lore.kernel.org/20260718002125.637104-1-lienze@kylinos.cn Signed-off-by: Enze Li <lienze@kylinos.cn> Reviewed-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
488cf81c49
commit
a43ea999c5
|
|
@ -339,8 +339,6 @@ static unsigned int damon_migrate_folio_list(struct list_head *folio_list,
|
|||
LIST_HEAD(migrate_folios);
|
||||
|
||||
while (!list_empty(folio_list)) {
|
||||
struct folio *folio;
|
||||
|
||||
cond_resched();
|
||||
|
||||
folio = lru_to_folio(folio_list);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user