Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp937398ybb; Fri, 20 Mar 2020 10:31:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vub/iZvmPlIvA/eSEwYGjKy+5cigQOhAb3OVNpAYAFsdS34AKoc3wgeveppG2XruXSXJtq4 X-Received: by 2002:a05:6830:109:: with SMTP id i9mr8251941otp.4.1584725492826; Fri, 20 Mar 2020 10:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584725492; cv=none; d=google.com; s=arc-20160816; b=jA1tjixxIABEwS7Jx6VO+wOzCH4ZU7e13u0dFjzudtCdKaHs97L9tvsSYoNJpbCFiY u5/9nY+725QyArP7eKR06d9hIqhCF74dtovjGlkxE4Y7enxy8GwQbMWKRGIZbhR1OwDk zGOeMGX5dZ4RF4EFLKvx8n8/cx9qKCVxBJrl8M+0qQoWry/1dO+OjDuxvuGOAhKWxMmZ fts1uZqqCnErKp4X8ZcSJlR34cWa2Mc/+cptpenEI4kIvDVefLkd1mOpzwnFuMHkW3Us ewPMkz7CFFAV9HCPsZ4AiyVlBEqJ6ivo/b7/8erHjZ/olBjrAk6tfsjFGLZBb+DmZ3la /zEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=KbSuqPzEciJyHCmkMC1SAADIc71TxnZ5056NwIQx0Ug=; b=GX5OzWuSnSPJYBGdOPW9a4XrjBIv8ZLpNLTZhzbp6b//3q510cuWJOYmh1onnWuY4A NMZtoFAGHNws5tvvXwZzIhZxWf/REu/ngzY5RUFhT9BF5j/KNJEKhoemxvx43bKn3NkM /WVtRne+I4VpxQB9UHP8ySlHVoUVikK3Ju/TMSqWY4Crun+SC3AWjDzztQaYItYmmBW+ 2jKRRWF+7PL0dZ8hUJ/QyJrsT73Y7+Oh03GBscxeA6y60RYAWt4RjvseCcUZjiRctwQ5 TnMAVW9zdhmEm7qnEbqy4fYJNnOeefayPtlZqPVns3+JEMphK9t4u6eLahxf2FDdBFIi rygA== ARC-Authentication-Results: i=1; mx.google.com; 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 v127si3165006oib.25.2020.03.20.10.31.17; Fri, 20 Mar 2020 10:31:32 -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; 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 S1727224AbgCTR26 (ORCPT + 99 others); Fri, 20 Mar 2020 13:28:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:40238 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727176AbgCTR25 (ORCPT ); Fri, 20 Mar 2020 13:28:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E1AF1AC84; Fri, 20 Mar 2020 17:28:55 +0000 (UTC) Subject: Re: [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment To: mateusznosek0@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org References: <20200318174509.15021-1-mateusznosek0@gmail.com> From: Vlastimil Babka Message-ID: Date: Fri, 20 Mar 2020 18:28:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200318174509.15021-1-mateusznosek0@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/18/20 6:45 PM, mateusznosek0@gmail.com wrote: > From: Mateusz Nosek > > Previously 0 was assigned to variable 'last_migrated_pfn'. But the > variable is not read after that, so the assignment can be removed. > > Signed-off-by: Mateusz Nosek Acked-by: Vlastimil Babka > --- > mm/compaction.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 827d8a2b3164..4576d6c5afb5 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -2183,7 +2183,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) > ret = COMPACT_CONTENDED; > putback_movable_pages(&cc->migratepages); > cc->nr_migratepages = 0; > - last_migrated_pfn = 0; > goto out; > case ISOLATE_NONE: > if (update_cached) { >