Skip to content

Commit

Permalink
mm/vmscan.c: fix -Wunused-but-set-variable warning
Browse files Browse the repository at this point in the history
We fix the following warning when building kernel with W=1:

  mm/vmscan.c:1362:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]

Link: https://lkml.kernel.org/r/20210924181218.21165-1-songkai01@inspur.com
Signed-off-by: Kai Song <songkai01@inspur.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kai Song authored and Linus Torvalds committed Nov 6, 2021
1 parent a500cb3 commit cb75463
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,6 @@ static unsigned int demote_page_list(struct list_head *demote_pages,
{
int target_nid = next_demotion_node(pgdat->node_id);
unsigned int nr_succeeded;
int err;

if (list_empty(demote_pages))
return 0;
Expand All @@ -1346,7 +1345,7 @@ static unsigned int demote_page_list(struct list_head *demote_pages,
return 0;

/* Demotion ignores all cpuset and mempolicy settings */
err = migrate_pages(demote_pages, alloc_demote_page, NULL,
migrate_pages(demote_pages, alloc_demote_page, NULL,
target_nid, MIGRATE_ASYNC, MR_DEMOTION,
&nr_succeeded);

Expand Down

0 comments on commit cb75463

Please sign in to comment.