Skip to content

Commit

Permalink
mm/rmap.c: remove redundant variable cend
Browse files Browse the repository at this point in the history
Variable cend is set but never read, hence it is redundant and can be
removed.

Cleans up clang build warning: Value stored to 'cend' is never read

Link: http://lkml.kernel.org/r/[email protected]
Fixes: 369ea82 ("mm/rmap: update to new mmu_notifier semantic v2")
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Colin Ian King authored and torvalds committed Nov 16, 2017
1 parent f3f7c09 commit cdb07bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
mmu_notifier_invalidate_range_start(vma->vm_mm, start, end);

while (page_vma_mapped_walk(&pvmw)) {
unsigned long cstart, cend;
unsigned long cstart;
int ret = 0;

cstart = address = pvmw.address;
Expand All @@ -915,7 +915,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pte_wrprotect(entry);
entry = pte_mkclean(entry);
set_pte_at(vma->vm_mm, address, pte, entry);
cend = cstart + PAGE_SIZE;
ret = 1;
} else {
#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
Expand All @@ -931,7 +930,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
entry = pmd_mkclean(entry);
set_pmd_at(vma->vm_mm, address, pmd, entry);
cstart &= PMD_MASK;
cend = cstart + PMD_SIZE;
ret = 1;
#else
/* unexpected pmd-mapped page? */
Expand Down

0 comments on commit cdb07bd

Please sign in to comment.