* + liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing.patch added to mm-nonmm-unstable branch
@ 2025-11-04 3:26 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-11-04 3:26 UTC (permalink / raw)
To: mm-commits, tj, rppt, rdunlap, pratyush, pasha.tatashin, ojeda,
masahiroy, jgg, jgg, horms, graf, corbet, changyuanl, brauner,
yanjun.zhu, akpm
The patch titled
Subject: liveupdate: kho: use %pe format specifier for error pointer printing
has been added to the -mm mm-nonmm-unstable branch. Its filename is
liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Zhu Yanjun <yanjun.zhu@linux.dev>
Subject: liveupdate: kho: use %pe format specifier for error pointer printing
Date: Sat, 1 Nov 2025 10:23:25 -0400
Make pr_xxx() call to use the %pe format specifier instead of %d. The %pe
specifier prints a symbolic error string (e.g., -ENOMEM, -EINVAL) when
given an error pointer created with ERR_PTR(err).
This change enhances the clarity and diagnostic value of the error message
by showing a descriptive error name rather than a numeric error code.
Note, that some err are still printed by value, as those errors might come
from libfdt and not regular errnos.
Link: https://lkml.kernel.org/r/20251101142325.1326536-10-pasha.tatashin@soleen.com
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Co-developed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Changyuan Lyu <changyuanl@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/liveupdate/kexec_handover.c | 4 ++--
kernel/liveupdate/kexec_handover_debugfs.c | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
--- a/kernel/liveupdate/kexec_handover.c~liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing
+++ a/kernel/liveupdate/kexec_handover.c
@@ -1449,8 +1449,8 @@ void __init kho_populate(phys_addr_t fdt
memblock_add(area->addr, size);
err = memblock_mark_kho_scratch(area->addr, size);
if (WARN_ON(err)) {
- pr_warn("failed to mark the scratch region 0x%pa+0x%pa: %d",
- &area->addr, &size, err);
+ pr_warn("failed to mark the scratch region 0x%pa+0x%pa: %pe",
+ &area->addr, &size, ERR_PTR(err));
goto out;
}
pr_debug("Marked 0x%pa+0x%pa as scratch", &area->addr, &size);
--- a/kernel/liveupdate/kexec_handover_debugfs.c~liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing
+++ a/kernel/liveupdate/kexec_handover_debugfs.c
@@ -150,8 +150,8 @@ __init void kho_in_debugfs_init(struct k
err = __kho_debugfs_fdt_add(&dbg->fdt_list, sub_fdt_dir, name,
phys_to_virt(*fdt_phys));
if (err) {
- pr_warn("failed to add fdt %s to debugfs: %d\n", name,
- err);
+ pr_warn("failed to add fdt %s to debugfs: %pe\n", name,
+ ERR_PTR(err));
continue;
}
}
@@ -168,8 +168,10 @@ err_out:
* reviving state from KHO and setting up KHO for the next
* kexec.
*/
- if (err)
- pr_err("failed exposing handover FDT in debugfs: %d\n", err);
+ if (err) {
+ pr_err("failed exposing handover FDT in debugfs: %pe\n",
+ ERR_PTR(err));
+ }
}
__init int kho_out_debugfs_init(struct kho_debugfs *dbg)
_
Patches currently in -mm which might be from yanjun.zhu@linux.dev are
liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-04 3:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 3:26 + liveupdate-kho-use-%pe-format-specifier-for-error-pointer-printing.patch added to mm-nonmm-unstable branch Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).