Skip to content

Commit bf90ac1

Browse files
Wang Qingtorvalds
authored andcommitted
mm/memory.c: do_numa_page(): delete bool "migrated"
Smatch gives the warning: do_numa_page() warn: assigning (-11) to unsigned variable 'migrated' Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wang Qing <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9317d0f commit bf90ac1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mm/memory.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,7 +4098,6 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
40984098
int page_nid = NUMA_NO_NODE;
40994099
int last_cpupid;
41004100
int target_nid;
4101-
bool migrated = false;
41024101
pte_t pte, old_pte;
41034102
bool was_writable = pte_savedwrite(vmf->orig_pte);
41044103
int flags = 0;
@@ -4168,8 +4167,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf)
41684167
}
41694168

41704169
/* Migrate to the requested node */
4171-
migrated = migrate_misplaced_page(page, vma, target_nid);
4172-
if (migrated) {
4170+
if (migrate_misplaced_page(page, vma, target_nid)) {
41734171
page_nid = target_nid;
41744172
flags |= TNF_MIGRATED;
41754173
} else

0 commit comments

Comments
 (0)