Commit f5db7146 authored by Carlos López's avatar Carlos López Committed by Huacai Chen
Browse files

LoongArch: Use IS_ERR_PCPU() macro for KGDB



In commit a759e37f ("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: default avatarCarlos López <clopez@suse.de>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 5ec5ac4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;