From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E60E5C433F5 for ; Tue, 15 Mar 2022 12:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mc3FKq8XCylOD6Sfy/uFVZfSx3ZG8wGbvM9GxzI4iU8=; b=1vYGsJVZY0UT46 AKvgCTVzNMO1YUqFhvkzzBmbZX3eZy8EL68jkKSm7bMvJWBvWh/5dsr8xghRdu33Be/ZTqxGe4zyk EljxHTaDxtxdYaVN4u0wi2gHQboKIMrQZadXuMfrhke+bF8lq9kp5FeiQ76byIv+wDDzbqS/CYhO0 AeEWED0MoK5cYbKi0kY8kTuUHA+GYL4i1q0didQlZcwPe+17Wklw0N1lNR6vCGSqB5ayieuK1J/+j o84MSkNkHvBXUWi4QPltJkSY4uOKy6OO8X5waMvbOx5S70WZ58TDARq7ui28fgdfy03RgYkgAbBpQ 9C0MyR0Ud4EnhVliIU8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU6BT-00906B-OI; Tue, 15 Mar 2022 12:21:51 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU6BO-00904Q-Tg for linux-arm-kernel@lists.infradead.org; Tue, 15 Mar 2022 12:21:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647346905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AXboPqU1D0WQ3MWcUTFOVkR/M0ow9vS7S0ofpF7HN+U=; b=f7gxP9YziXkkasodaD9CfRGScEvlGKuY5EH9tcIe3igcTmEpBDn+SD56tPc5F/bWwa3sRY 7s5X5grid1VWjxSFAQSSi0nanAOm6D5rQ0Y4gJlVWaa9a+dmKwvTm84vVOyevRIIr+dSn6 tiSADXROqpCbno0AOe3jp5rEK3jhS04= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-152-65-ms_gAPJqQqa2udcNlUg-1; Tue, 15 Mar 2022 08:21:42 -0400 X-MC-Unique: 65-ms_gAPJqQqa2udcNlUg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9FDA833961; Tue, 15 Mar 2022 12:21:41 +0000 (UTC) Received: from localhost (ovpn-12-225.pek2.redhat.com [10.72.12.225]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32F18426322; Tue, 15 Mar 2022 12:21:40 +0000 (UTC) Date: Tue, 15 Mar 2022 20:21:37 +0800 From: Baoquan He To: Zhen Lei Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly , Dave Kleikamp Subject: Re: [PATCH v21 1/5] kdump: return -ENOENT if required cmdline option does not exist Message-ID: References: <20220227030717.1464-1-thunder.leizhen@huawei.com> <20220227030717.1464-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_052147_067944_D3FFA063 X-CRM114-Status: GOOD ( 27.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/15/22 at 07:57pm, Baoquan He wrote: > On 02/27/22 at 11:07am, Zhen Lei wrote: > > The crashkernel=Y,low is an optional command-line option. When it doesn't > > exist, kernel will try to allocate minimum required memory below 4G > > automatically. Give it a unique error code to distinguish it from other > > error scenarios. > > > > Signed-off-by: Zhen Lei > > --- > > kernel/crash_core.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > > index 256cf6db573cd09..4d57c03714f4e13 100644 > > --- a/kernel/crash_core.c > > +++ b/kernel/crash_core.c > > @@ -243,9 +243,8 @@ static int __init __parse_crashkernel(char *cmdline, > > *crash_base = 0; > > > > ck_cmdline = get_last_crashkernel(cmdline, name, suffix); > > - > > if (!ck_cmdline) > > - return -EINVAL; > > + return -ENOENT; > > Firstly, I am not sure if '-ENOENT' is a right value to return. From the > code comment of ENOENT, it's used for file or dir? > #define ENOENT 2 /* No such file or directory */ > > Secondly, we ever discussed the case including > - no crashkernel=,low is provided; > - messy code is provied, e.g crashkernel=aaaaaabbbb,low Checking the 3rd pach, this is handled. Take back my below words, continue reviewing. > > The 2nd one is not handled in this patchset. How about taking the > handling into another round of patches. This patchset just adds > crashkernel=,high purely. > > > > > ck_cmdline += strlen(name); > > > > -- > > 2.25.1 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel