提交 3e009f7e 编写于 作者: H He Sheng 提交者: guzitao

sw64: fix a type mismatch problem

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56QAM

--------------------------------

This patch fixes a pointer/integer type mismatch in conditional
expression, which leads to a compile warning.
Signed-off-by: NHe Sheng <hesheng@wxiat.com>
Reviewed-by: NCui Wei <cuiwei@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
上级 875e063d
......@@ -20,7 +20,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
case PERF_REG_SW64_GP:
return regs->gp;
case PERF_REG_SW64_SP:
return (u64)(user_mode(regs) ? rdusp() : (regs + 1));
return (user_mode(regs) ? rdusp() : (u64)(regs + 1));
case PERF_REG_SW64_PC:
return regs->pc;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册