Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6422356rdb; Thu, 14 Dec 2023 19:28:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6WvFLfsyXdQXEWffX5n/LBXbqX/jW3QQJBGDrXGqRijuMvjvcuZjytoGQoyi8WkKBPtwn X-Received: by 2002:a05:6a20:6881:b0:18f:9c4:d34d with SMTP id n1-20020a056a20688100b0018f09c4d34dmr11915053pzj.61.1702610889834; Thu, 14 Dec 2023 19:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702610889; cv=none; d=google.com; s=arc-20160816; b=G9b/moAzjLI7NcMzqw+5R696MLwe+AOagqFZRBCLNH16fFbdbUvAU5u6d1KjJZybKu MT2maULttM0B19f1z9N8Zag+Qoc3cNclPtZ2cQjvdrU5RiwCd/nVKZRU41okTbF/dcss MTJC7mjSIlz5rJ6M4pzRjC6+H+85FNdAQT5PCgwgIxeqzYSRO9yc53IJU5kFRNcd9H24 gn37BKLHoOSgZbpjo3e6uowuZbRz1Wq6CIQgl5Wx10SV8tjTGYwKC64jiPmi81PLgfeQ dDQXSRhJ/kg4j23+80jYssaJi/Ahork3gnE45lRdclAQadP8jA1qgmZZplK+3VjdLJSi 3+rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LwL29/cvUYFmPMFizthvB5mbwWT7pj5mVWcUZ0VQ95E=; fh=I165TSZ0GjD36GwMoCm97Y1Bz8UCbACe1bpnzFejHRo=; b=KdBC9oJGcDBXmj0tG/N4FawHMqXNXWN/wA1g2yvLMKYjP3RVng3DJNtTQtBrnKb+uB /6XFhVu8Q7eqnjGFMShQyFHYKw68sjxq/19ZOy8Rq8OJP5kZvpAPalFeoefC7oUJlsy1 FdPpiSWtb8KNRR1Z8mCGVYR5IXO745ThL/AoYXuCM6r1uys3ESKkhdhm5pchTldnVmnk /pJDmtGsP7qra3QseTqhHn/lGF4dUN03q01RhiCSyTXziPas5nrYBFyXWz3xqFogJFzR PvB3gy8f1FjDXAVJyFZQ15bxXS/Uu2vomQaSQQDTxcv7w+tVWUKWJ4NRYz7+y/yHpU1G SGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BL9fG1Vi; spf=pass (google.com: domain of linux-kernel+bounces-403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u24-20020a631418000000b00584b6af3b9fsi12498660pgl.524.2023.12.14.19.28.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 19:28:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BL9fG1Vi; spf=pass (google.com: domain of linux-kernel+bounces-403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 33B28B220FE for ; Fri, 15 Dec 2023 03:28:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B9566AD9; Fri, 15 Dec 2023 03:27:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BL9fG1Vi" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3B636AA1 for ; Fri, 15 Dec 2023 03:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702610874; 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=LwL29/cvUYFmPMFizthvB5mbwWT7pj5mVWcUZ0VQ95E=; b=BL9fG1ViaydqQIMV3SFv7dcwApRPNy+mp3oJbuShgrWUUN41sclF4QYUmNM8HgYgOQXQYA sf2ENn5s97ehDrIeazOhderrS828jjSZ6jMOCjTawbqopdd+k7GYVTp96PZtlSEQElx8QS Ggb0Ob2XP+7omMh5L8AEFGgeW1VGJjQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-176-YCg3eLfLP4ybHpWIskAtsg-1; Thu, 14 Dec 2023 22:27:48 -0500 X-MC-Unique: YCg3eLfLP4ybHpWIskAtsg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AD7A6101A555; Fri, 15 Dec 2023 03:27:47 +0000 (UTC) Received: from localhost (unknown [10.72.116.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACB4140C6EB9; Fri, 15 Dec 2023 03:27:46 +0000 (UTC) Date: Fri, 15 Dec 2023 11:27:43 +0800 From: Baoquan He To: Yuntao Wang Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Vivek Goyal , Dave Young , Hari Bathini , Eric DeVolder , Andrew Morton , Sourabh Jain , Sean Christopherson , Takashi Iwai , Lianbo Jiang Subject: Re: [PATCH 1/3] x86/crash: remove the unused image parameter from prepare_elf_headers() Message-ID: References: <20231214163842.129139-1-ytcoode@gmail.com> <20231214163842.129139-2-ytcoode@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231214163842.129139-2-ytcoode@gmail.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 On 12/15/23 at 12:38am, Yuntao Wang wrote: > The image parameter is no longer in use, remove it. Also, tidy up the code > formatting. > > Signed-off-by: Yuntao Wang > --- > arch/x86/kernel/crash.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Acked-by: Baoquan He > > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c > index c92d88680dbf..792231a56d11 100644 > --- a/arch/x86/kernel/crash.c > +++ b/arch/x86/kernel/crash.c > @@ -198,8 +198,8 @@ static int prepare_elf64_ram_headers_callback(struct resource *res, void *arg) > } > > /* Prepare elf headers. Return addr and size */ > -static int prepare_elf_headers(struct kimage *image, void **addr, > - unsigned long *sz, unsigned long *nr_mem_ranges) > +static int prepare_elf_headers(void **addr, unsigned long *sz, > + unsigned long *nr_mem_ranges) > { > struct crash_mem *cmem; > int ret; > @@ -221,7 +221,7 @@ static int prepare_elf_headers(struct kimage *image, void **addr, > *nr_mem_ranges = cmem->nr_ranges; > > /* By default prepare 64bit headers */ > - ret = crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); > + ret = crash_prepare_elf64_headers(cmem, IS_ENABLED(CONFIG_X86_64), addr, sz); > > out: > vfree(cmem); > @@ -349,7 +349,7 @@ int crash_load_segments(struct kimage *image) > .buf_max = ULONG_MAX, .top_down = false }; > > /* Prepare elf headers and add a segment */ > - ret = prepare_elf_headers(image, &kbuf.buffer, &kbuf.bufsz, &pnum); > + ret = prepare_elf_headers(&kbuf.buffer, &kbuf.bufsz, &pnum); > if (ret) > return ret; > > @@ -452,7 +452,7 @@ void arch_crash_handle_hotplug_event(struct kimage *image) > * Create the new elfcorehdr reflecting the changes to CPU and/or > * memory resources. > */ > - if (prepare_elf_headers(image, &elfbuf, &elfsz, &nr_mem_ranges)) { > + if (prepare_elf_headers(&elfbuf, &elfsz, &nr_mem_ranges)) { > pr_err("unable to create new elfcorehdr"); > goto out; > } > -- > 2.43.0 >