Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

LoongArch: Use IS_ERR_PCPU() macro for KGDB

In commit 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>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

authored by

Carlos López and committed by
Huacai Chen
f5db7146 5ec5ac4c

+1 -1
+1 -1
arch/loongarch/kernel/kgdb.c
··· 697 697 continue; 698 698 699 699 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)) { 701 701 pr_err("kgdb: Could not allocate hw breakpoints.\n"); 702 702 breakinfo[i].pev = NULL; 703 703 return;