Message ID | 1566533321-23131-1-git-send-email-zhengbin13@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/rmap.c: remove set but not used variable 'cstart' | expand |
On Fri, Aug 23, 2019 at 12:08:41PM +0800, zhengbin wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > mm/rmap.c: In function page_mkclean_one: > mm/rmap.c:906:17: warning: variable cstart set but not used [-Wunused-but-set-variable] > > It is not used since commit 0f10851ea475 ("mm/mmu_notifier: > avoid double notification when it is useless") > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: zhengbin <zhengbin13@huawei.com> There is already fix in the mm tree. See http://lkml.kernel.org/r/20190724141453.38536-1-yuehaibing@huawei.com
diff --git a/mm/rmap.c b/mm/rmap.c index 003377e..31352bb 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -903,10 +903,9 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma, mmu_notifier_invalidate_range_start(&range); while (page_vma_mapped_walk(&pvmw)) { - unsigned long cstart; int ret = 0; - cstart = address = pvmw.address; + address = pvmw.address; if (pvmw.pte) { pte_t entry; pte_t *pte = pvmw.pte; @@ -933,7 +932,6 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma, entry = pmd_wrprotect(entry); entry = pmd_mkclean(entry); set_pmd_at(vma->vm_mm, address, pmd, entry); - cstart &= PMD_MASK; ret = 1; #else /* unexpected pmd-mapped page? */
Fixes gcc '-Wunused-but-set-variable' warning: mm/rmap.c: In function page_mkclean_one: mm/rmap.c:906:17: warning: variable cstart set but not used [-Wunused-but-set-variable] It is not used since commit 0f10851ea475 ("mm/mmu_notifier: avoid double notification when it is useless") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> --- mm/rmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.7.4