From: Baoquan He <bhe@redhat.com>
To: Yuntao Wang <ytcoode@gmail.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Vivek Goyal <vgoyal@redhat.com>,
Dave Young <dyoung@redhat.com>,
Hari Bathini <hbathini@linux.ibm.com>,
Eric DeVolder <eric.devolder@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
Sean Christopherson <seanjc@google.com>,
Takashi Iwai <tiwai@suse.de>, Lianbo Jiang <lijiang@redhat.com>
Subject: Re: [PATCH 1/3] x86/crash: remove the unused image parameter from prepare_elf_headers()
Date: Fri, 15 Dec 2023 11:27:43 +0800 [thread overview]
Message-ID: <ZXvHrx9ODn1yW9hf@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20231214163842.129139-2-ytcoode@gmail.com>
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 <ytcoode@gmail.com>
> ---
> arch/x86/kernel/crash.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Acked-by: Baoquan He <bhe@redhat.com>
>
> 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
>
next prev parent reply other threads:[~2023-12-15 3:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 16:38 [PATCH 0/3] Some cleanups and fixes Yuntao Wang
2023-12-14 16:38 ` [PATCH 1/3] x86/crash: remove the unused image parameter from prepare_elf_headers() Yuntao Wang
2023-12-15 3:27 ` Baoquan He [this message]
2023-12-14 16:38 ` [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value Yuntao Wang
2023-12-15 3:28 ` Baoquan He
2023-12-14 16:38 ` [PATCH 3/3] crash_core: fix and simplify the logic of crash_exclude_mem_range() Yuntao Wang
2023-12-15 15:15 ` Baoquan He
2023-12-16 1:54 ` Yuntao Wang
2023-12-16 3:31 ` Baoquan He
2023-12-29 20:10 ` Andrew Morton
2023-12-30 10:16 ` Baoquan He
2024-01-02 8:41 ` Baoquan He
2024-01-02 15:06 ` Yuntao Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXvHrx9ODn1yW9hf@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dyoung@redhat.com \
--cc=eric.devolder@oracle.com \
--cc=hbathini@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=lijiang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=sourabhjain@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.de \
--cc=vgoyal@redhat.com \
--cc=x86@kernel.org \
--cc=ytcoode@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox