Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbdGRLEE (ORCPT ); Tue, 18 Jul 2017 07:04:04 -0400 Received: from mail.skyhub.de ([5.9.137.197]:52354 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbdGRLEB (ORCPT ); Tue, 18 Jul 2017 07:04:01 -0400 Date: Tue, 18 Jul 2017 13:03:39 +0200 From: Borislav Petkov To: Wei Yang Cc: kirill@shutemov.name, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tj@kernel.org, rientjes@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 1/3] x86/numa_emulation: refine the calculation of max_emu_nid and dfl_phys_nid Message-ID: <20170718105953.GA9149@nazgul.tnic> References: <20170708013059.29708-1-richard.weiyang@gmail.com> <20170708013059.29708-2-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170708013059.29708-2-richard.weiyang@gmail.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 33 On Sat, Jul 08, 2017 at 09:30:57AM +0800, Wei Yang wrote: > max_emu_nid and dfl_phys_nid is calculated from emu_nid_to_phys[], which is > calculated in split_nodes_xxx_interleave(). From the logic in these $ git grep split_nodes_xxx_interleave $ > functions, it is assured the emu_nid_to_phys[] has meaningful value if it > return successfully and ensures dfl_phys_nid will get a valid value. > > This patch removes the error branch to check invalid dfl_phys_nid and So the check doesn't hurt anyone. On the contrary - it is an "assertion" of sorts in otherwise complex code and actually documents the fact that by then emu_nid_to_phys[] needs to be setup properly. And it is especially useful if someone decides to change that code in the future, for whatever reason, and gets to hit that check - it'll even be helpful in that case. So I'd vote for keeping that check and not doing anything. While we're at it, never say "this patch" in a commit message - that is tautologically obvious. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --