Skip to content

Commit f5db714

Browse files
00xcchenhuacai
authored andcommitted
LoongArch: Use IS_ERR_PCPU() macro for KGDB
In commit a759e37 ("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> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 5ec5ac4 commit f5db714

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/loongarch/kernel/kgdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ void kgdb_arch_late(void)
697697
continue;
698698

699699
breakinfo[i].pev = register_wide_hw_breakpoint(&attr, NULL, NULL);
700-
if (IS_ERR((void * __force)breakinfo[i].pev)) {
700+
if (IS_ERR_PCPU(breakinfo[i].pev)) {
701701
pr_err("kgdb: Could not allocate hw breakpoints.\n");
702702
breakinfo[i].pev = NULL;
703703
return;

0 commit comments

Comments
 (0)