[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10d2821c-cc56-961b-8f43-ae9097ed0621@oracle.com>
Date: Wed, 24 Jul 2019 11:24:10 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: YueHaibing <yuehaibing@...wei.com>, akpm@...ux-foundation.org,
jglisse@...hat.com, kirill.shutemov@...ux.intel.com,
rcampbell@...dia.com, ktkhai@...tuozzo.com,
colin.king@...onical.com
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm/rmap.c: remove set but not used variable 'cstart'
On 7/24/19 7:14 AM, YueHaibing 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 any more since
> commit cdb07bdea28e ("mm/rmap.c: remove redundant variable cend")
It appears Commit 0f10851ea475 ("mm/mmu_notifier: avoid double notification
when it is useless") is what removed the use of cstart and cend. And, they
should have been removed then.
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
> ---
> mm/rmap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index ec1af8b..40e4def 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? */
>
Powered by blists - more mailing lists