Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4073428rdb; Thu, 14 Sep 2023 10:55:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZHWvyJYCwiFZpLf0HwdstxNvPbNOglTL2Y98N60LODauAC+6HvtKExHSzySXHV+qqj53U X-Received: by 2002:a17:902:e5ce:b0:1bb:ac37:384b with SMTP id u14-20020a170902e5ce00b001bbac37384bmr6611259plf.6.1694714143461; Thu, 14 Sep 2023 10:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694714143; cv=none; d=google.com; s=arc-20160816; b=D9M+OZMMThazm23R7N9W17GBxN0+ncNUI3bMMkpQfD/nSADiPKHpRN78t9h1K5+qBx K1840dkOBK/iQw0deMOfPJ58yTomivqD3Ghm/D0voXvx3jxLvyazoIAN4mqQz56Wvxri FJm3UyvVI452b/wtKi5sNrY8JOsWJE/Gz3Ob69IyAjKLN6J78WNv5PDtImp4S2neDmag innX6k4C/Gj6TfG9WpCa2TnPI+6CW2TvgsdKymHa1qfDhaa7LNVyxrWKH088MpdQ/u1m ldtdlTv3n7bi8ohCKtSRohpH5UeUa0xS2BzaPYPL3+yA4pMkp/h5FxkikR15nCHWnDi5 P7JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TjqOcwWBrkh/CdUM/5gfUPqEhH0IYqtSZbAnP+4qzQo=; fh=MEj7E4phu0bfxfJQeKfSjdtfALcYFA7fSBdgsxijU1g=; b=XC1aSEWcNf9tC9LySHYAlXexcaH39yKsYvHjQ7NBY2jiwbzkniIRVPN5M5UCqChdhh PaEW8H8LBfGU76x61JlkUWnG6XrdEpqjt/gY9+KQiDgwcqLObK9tDCAbQHLPzYYFEyAv lm3OgVaH1ymv75U6KNlJjDE/rzU7q/CKMc+6i/MkFxE0PjU8ZPf/JOAVbXp3rMh9JOhp u71HJwf+jrL8HVnP4qpTcYLGfLj0s4UDyb0jrmgTDsLgk6jzDM5BX2wgt4+aUFK6MuSE yJVhqcZRTMzfZMJh+ZYYQTZ4FWTU0n+tVmTw7E/6IkpmLn3DFh6xGqeCY+Go0qw/MGdm yaqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ii1FH1uO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id km16-20020a17090327d000b001c3346175acsi1981483plb.137.2023.09.14.10.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 10:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ii1FH1uO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B192C8247769; Wed, 13 Sep 2023 20:32:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234177AbjINDcw (ORCPT + 99 others); Wed, 13 Sep 2023 23:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234170AbjINDct (ORCPT ); Wed, 13 Sep 2023 23:32:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7893D1BDC for ; Wed, 13 Sep 2023 20:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694662319; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TjqOcwWBrkh/CdUM/5gfUPqEhH0IYqtSZbAnP+4qzQo=; b=ii1FH1uO+Km49c2/02wj6FEQ3n1wQ8C/1dFliDtNXmmPyTJKZcYR1myfKuDxTS+Bd+Y/Ig kmrn+6ozGEaRPnWtZZK6UXHptWaEWJY7DPn5t0+kL7/jmJaThGvQ2dE12H9i0NlNab2GLQ 7gnsjvjDJ0N2n1l4occifrilp/a6ZIg= 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-551-8r3y9f3cN0Sw9nZr-XdCgw-1; Wed, 13 Sep 2023 23:31:55 -0400 X-MC-Unique: 8r3y9f3cN0Sw9nZr-XdCgw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8724B802D38; Thu, 14 Sep 2023 03:31:54 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 773611054FC0; Thu, 14 Sep 2023 03:31:50 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, thunder.leizhen@huawei.com, catalin.marinas@arm.com, chenjiahao16@huawei.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, x86@kernel.org, Baoquan He Subject: [PATCH v3 1/9] crash_core.c: remove unnecessary parameter of function Date: Thu, 14 Sep 2023 11:31:34 +0800 Message-ID: <20230914033142.676708-2-bhe@redhat.com> In-Reply-To: <20230914033142.676708-1-bhe@redhat.com> References: <20230914033142.676708-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Sep 2023 20:32:55 -0700 (PDT) In all call sites of __parse_crashkernel(), the parameter 'name' is hardcoded as "crashkernel=". So remove the unnecessary parameter 'name', add local varibale 'name' inside __parse_crashkernel() instead. Signed-off-by: Baoquan He Reviewed-by: Zhen Lei --- kernel/crash_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index 03a7932cde0a..c9695204715d 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -248,11 +248,11 @@ static int __init __parse_crashkernel(char *cmdline, unsigned long long system_ram, unsigned long long *crash_size, unsigned long long *crash_base, - const char *name, const char *suffix) { char *first_colon, *first_space; char *ck_cmdline; + char *name = "crashkernel="; BUG_ON(!crash_size || !crash_base); *crash_size = 0; @@ -290,7 +290,7 @@ int __init parse_crashkernel(char *cmdline, unsigned long long *crash_base) { return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, - "crashkernel=", NULL); + NULL); } int __init parse_crashkernel_high(char *cmdline, @@ -299,7 +299,7 @@ int __init parse_crashkernel_high(char *cmdline, unsigned long long *crash_base) { return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, - "crashkernel=", suffix_tbl[SUFFIX_HIGH]); + suffix_tbl[SUFFIX_HIGH]); } int __init parse_crashkernel_low(char *cmdline, @@ -308,7 +308,7 @@ int __init parse_crashkernel_low(char *cmdline, unsigned long long *crash_base) { return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, - "crashkernel=", suffix_tbl[SUFFIX_LOW]); + suffix_tbl[SUFFIX_LOW]); } /* -- 2.41.0