From: Yuntao Wang <ytcoode@gmail.com>
To: akpm@linux-foundation.org
Cc: bhe@redhat.com, bp@alien8.de, corbet@lwn.net,
dave.hansen@linux.intel.com, ebiederm@xmission.com,
hpa@zytor.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, mingo@redhat.com,
tglx@linutronix.de, x86@kernel.org, ytcoode@gmail.com
Subject: [PATCH v2] x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs
Date: Wed, 20 Dec 2023 11:01:24 +0800 [thread overview]
Message-ID: <20231220030124.149160-1-ytcoode@gmail.com> (raw)
In-Reply-To: <20231219122151.aa4ae562537abf74067588fe@linux-foundation.org>
When detecting an error, the current code uses kexec_dprintk() to output
log message. This is not quite appropriate as kexec_dprintk() is mainly
used for outputting debugging messages, rather than error messages.
Replace kexec_dprintk() with pr_err(). This also makes the output method
for this error log align with the output method for other error logs in
this function.
Additionally, the last return statement in set_page_address() is
unnecessary, remove it.
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
---
v1 -> v2: Rewrite changelogs
arch/x86/kernel/kexec-bzimage64.c | 2 +-
mm/highmem.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
index e9ae0eac6bf9..4a77d5dd4bce 100644
--- a/arch/x86/kernel/kexec-bzimage64.c
+++ b/arch/x86/kernel/kexec-bzimage64.c
@@ -429,7 +429,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
* command line. Make sure it does not overflow
*/
if (cmdline_len + MAX_ELFCOREHDR_STR_LEN > header->cmdline_size) {
- kexec_dprintk("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");
+ pr_err("Appending elfcorehdr=<addr> to command line exceeds maximum allowed length\n");
return ERR_PTR(-EINVAL);
}
diff --git a/mm/highmem.c b/mm/highmem.c
index e19269093a93..bd48ba445dd4 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -799,8 +799,6 @@ void set_page_address(struct page *page, void *virtual)
}
spin_unlock_irqrestore(&pas->lock, flags);
}
-
- return;
}
void __init page_address_init(void)
--
2.43.0
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2023-12-20 3:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-17 3:35 [PATCH v5 0/3] Some bug fixes and cleanups related to kexec Yuntao Wang
2023-12-17 3:35 ` [PATCH v5 1/3] kexec: modify the meaning of the end parameter in kimage_is_destination_range() Yuntao Wang
2023-12-17 3:35 ` [PATCH v5 2/3] kexec_file: fix incorrect temp_start value in locate_mem_hole_top_down() Yuntao Wang
2023-12-17 3:35 ` [PATCH v5 3/3] x86/kexec: use pr_err() instead of pr_debug() when an error occurs Yuntao Wang
2023-12-18 18:24 ` Andrew Morton
2023-12-19 7:29 ` [PATCH] x86/kexec: use pr_err() instead of kexec_dprintk() " Yuntao Wang
2023-12-19 20:21 ` Andrew Morton
2023-12-20 3:01 ` Yuntao Wang [this message]
2023-12-17 11:55 ` [PATCH v5 0/3] Some bug fixes and cleanups related to kexec Baoquan He
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=20231220030124.149160-1-ytcoode@gmail.com \
--to=ytcoode@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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