[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190806133503.GC30179@bombadil.infradead.org>
Date: Tue, 6 Aug 2019 06:35:03 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Pingfan Liu <kernelfans@...il.com>
Cc: linux-mm@...ck.org,
Jérôme Glisse <jglisse@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Jan Kara <jack@...e.cz>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Michal Hocko <mhocko@...e.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mm/migrate: clean up useless code in
migrate_vma_collect_pmd()
This needs something beyond the subject line. Maybe ...
After these assignments, we either restart the loop with a fresh variable,
or we assign to the variable again without using the value we've assigned.
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> goto next;
> }
> - pfn = page_to_pfn(page);
After you've done all this, as far as I can tell, the 'pfn' variable is
only used in one arm of the conditions, so it can be moved there.
ie something like:
- unsigned long mpfn, pfn;
+ unsigned long mpfn;
...
- pfn = pte_pfn(pte);
...
+ unsigned long pfn = pte_pfn(pte);
+
Powered by blists - more mailing lists