From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2Rl3-0006aD-1Q for kexec@lists.infradead.org; Tue, 27 Aug 2019 03:02:58 +0000 Received: by mail-pl1-x643.google.com with SMTP id bj8so11020642plb.4 for ; Mon, 26 Aug 2019 20:02:56 -0700 (PDT) From: Pingfan Liu Subject: [PATCHv2 1/4] x86/apic: correct the ENO in generic_processor_info() Date: Tue, 27 Aug 2019 11:02:20 +0800 Message-Id: <1566874943-4449-2-git-send-email-kernelfans@gmail.com> In-Reply-To: <1566874943-4449-1-git-send-email-kernelfans@gmail.com> References: <1566874943-4449-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