From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huYqI-0006KH-KM for kexec@lists.infradead.org; Mon, 05 Aug 2019 08:59:48 +0000 Received: by mail-pl1-x644.google.com with SMTP id t14so36186284plr.11 for ; Mon, 05 Aug 2019 01:59:46 -0700 (PDT) From: Pingfan Liu Subject: [PATCH 1/4] x86/apic: correct the ENO in generic_processor_info() Date: Mon, 5 Aug 2019 16:58:56 +0800 Message-Id: <1564995539-29609-2-git-send-email-kernelfans@gmail.com> In-Reply-To: <1564995539-29609-1-git-send-email-kernelfans@gmail.com> References: <1564995539-29609-1-git-send-email-kernelfans@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Thomas Gleixner , Andy Lutomirski , x86@kernel.org Cc: Jacob Pan , Baoquan He , Peter Zijlstra , kexec@lists.infradead.org, Dave Hansen , Michal Hocko , linux-kernel@vger.kernel.org, Pingfan Liu , Daniel Drake , Ingo Molnar , Borislav Petkov , Masami Hiramatsu , "H. Peter Anvin" , Qian Cai , Dave Young , Vlastimil Babka , Eric Biederman When capped by nr_cpu_ids, the current code return -EINVAL or -ENODEV. It is better to return -EINVAL for both cases. Signed-off-by: Pingfan Liu To: Thomas Gleixner To: Andy Lutomirski Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Dave Hansen Cc: Peter Zijlstra To: x86@kernel.org Cc: Masami Hiramatsu Cc: Qian Cai Cc: Vlastimil Babka Cc: Daniel Drake Cc: Jacob Pan Cc: Michal Hocko Cc: Eric Biederman Cc: linux-kernel@vger.kernel.org Cc: Dave Young Cc: Baoquan He Cc: kexec@lists.infradead.org --- arch/x86/kernel/apic/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index f529136..f4f603a 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -2346,7 +2346,7 @@ int generic_processor_info(int apicid, int version) " Processor %d/0x%x ignored.\n", max, thiscpu, apicid); disabled_cpus++; - return -ENODEV; + return -EINVAL; } if (num_processors >= nr_cpu_ids) { -- 2.7.5 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec