loongarch/kgdb: use IS_ERR_PCPU() macro
PATCH 1/1 loongarch/kgdb: use IS_ERR_PCPU() macro
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 <[email protected]>
--- arch/loongarch/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/kernel/kgdb.c +1 -1
@@ -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
Signature · 1 line
2.51.0
Applied, thanks.
Huacai
Quoted 29 lines · Carlos López
In
a759e37fb467("err.h: addERR_PTR_PCPU(),PTR_ERR_PCPU()andIS_ERR_PCPU()macros"), specialized macros were added to check an error within a__percpupointer, so use them instead of manually casting with__force, like all other users ofregister_wide_hw_breakpoint().Signed-off-by Carlos López <[email protected]>--- arch/loongarch/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/loongarch/kernel/kgdb.c +1
-1@@ -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