Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4119941ybh; Tue, 6 Aug 2019 06:38:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4s8txJHBWkeiubHMcgBBlQxGOcBhXvPWapGucE7E+D7PefsN2xmOUU1CAsZPAEqBkx76x X-Received: by 2002:a62:1750:: with SMTP id 77mr3781722pfx.172.1565098683043; Tue, 06 Aug 2019 06:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565098683; cv=none; d=google.com; s=arc-20160816; b=J0E8Fdx1H26ahFCxi3q5D08uXIjK9GEGaSTj2nOROxtdk+25HV1H9d7SFKOFyFDdMf HkUh9WYNtyRgkTNTJiO85dYjXtQs5uC8eJHY7jgvF1sc7rBc4N7nGTpsucUmSRFBnifX hqkrs6okT/FnMFAcuT1s4OgNbaQgHHlyCwHaMgDejmI4tC09zv5LlR40Cn9yBviQkEFZ +/axuGK44GC+MynHTvjexIISQQmw/09u/PCPB/qDlwRW5DPD1Xv8cUXUG/hyfNBh317m wGDEhgjw8srX1yFCEBQoAHc1hV0LVcFYJsh1KyW9kQ22mj1Ezi02xYffeVxq67Vy76tL pCww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LSrTDhsJpuHztoZ1vcQuO446UAhMwmMAYnYunQdQJVw=; b=mSPmGF3SKXCv8YxATWm/Rx8/XYpEhYNwurdD7pDDmKFF8WZlSTneVe9M4LIQ/fZuQ0 bKuoPC3YpfQdV2PrFnlWTlbM77veWroRZ/GuBcScsNWzj+oiTvpHy76yv2zurDkWX86D oqADNR0nwQMj/wq9tSEbEp55nwkJOEEtgin+TU/uku+9NAbaC1XoFlAdfWbtNVUNaMfK 3D/ZBCLnHUCIbmbv+IxR0VEokZVBpKk2rYh2xD3FP46W1lAutEuXqoQWrPNBL8LV+A+s Q54NQe2tOAVhOtHImJGDCTN2kD1QWEtn4xhAnnC7qrD6QjvXzLzKAB/o0wIaHLmH7hH3 pVFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dfTE8QFW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si14813888pju.64.2019.08.06.06.37.47; Tue, 06 Aug 2019 06:38:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dfTE8QFW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731584AbfHFNfN (ORCPT + 99 others); Tue, 6 Aug 2019 09:35:13 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41880 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbfHFNfM (ORCPT ); Tue, 6 Aug 2019 09:35:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LSrTDhsJpuHztoZ1vcQuO446UAhMwmMAYnYunQdQJVw=; b=dfTE8QFWDKasKNrl8PXCKENnA IsKrDnUGP/zpSEhJ0QG5ygHuuJTq3B7DlBi+/eJWeBsvzw8dnTtST1kAD3YyRToBtRJP58aeFUkiB 3+HRTgVlp4K8xeDLEison7I8LUYJzN3p7U7CWFDZb7K/qvO/C8zZRSiIQHkz+hR0W88uBNtqkGpe1 Ppo6E5ronvOPCj5A8eBSS4I6gwTQ6BRzRzAeoXB2LvkUug8dmGHFuyFsE1IBOgJAViCJagElvFJgJ iAMHMYibhwEkKHFLQBQdjiRlRVhKF2doWfHNqHwVh8YNPrflGEylFt9NBAx6TV5/ZlXTEVvfpBxWM VFYR7EQTA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1huzcF-0005L9-Op; Tue, 06 Aug 2019 13:35:03 +0000 Date: Tue, 6 Aug 2019 06:35:03 -0700 From: Matthew Wilcox To: Pingfan Liu Cc: linux-mm@kvack.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , Mel Gorman , Jan Kara , "Kirill A. Shutemov" , Michal Hocko , Mike Kravetz , Andrea Arcangeli , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd() Message-ID: <20190806133503.GC30179@bombadil.infradead.org> References: <1565078411-27082-1-git-send-email-kernelfans@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1565078411-27082-1-git-send-email-kernelfans@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > 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); +