mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] loongarch/kgdb: use IS_ERR_PCPU() macro
@ 2026-01-22 10:56 Carlos López
  2026-01-25  4:07 ` Huacai Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos López @ 2026-01-22 10:56 UTC (permalink / raw)
  To: chenhuacai, loongarch; +Cc: Carlos López, WANG Xuerui, open list

In a759e37fb467 ("err.h: add ERR_PTR_PCPU(), PTR_ERR_PCPU() and
IS_ERR_PCPU() macros"), specialized macros were added to check an error
within a __percpu pointer, so use them instead of manually casting
with __force, like all other users of register_wide_hw_breakpoint().

Signed-off-by: Carlos López <clopez@suse.de>
---
 arch/loongarch/kernel/kgdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/loongarch/kernel/kgdb.c b/arch/loongarch/kernel/kgdb.c
index 7be5b4c0c900..17664a6043b1 100644
--- a/arch/loongarch/kernel/kgdb.c
+++ b/arch/loongarch/kernel/kgdb.c
@@ -697,7 +697,7 @@ void kgdb_arch_late(void)
 			continue;
 
 		breakinfo[i].pev = register_wide_hw_breakpoint(&attr, NULL, NULL);
-		if (IS_ERR((void * __force)breakinfo[i].pev)) {
+		if (IS_ERR_PCPU(breakinfo[i].pev)) {
 			pr_err("kgdb: Could not allocate hw breakpoints.\n");
 			breakinfo[i].pev = NULL;
 			return;

base-commit: a66191c590b3b58eaff05d2277971f854772bd5b
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-25  4:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-22 10:56 [PATCH] loongarch/kgdb: use IS_ERR_PCPU() macro Carlos López
2026-01-25  4:07 ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome