提交 d8a4ea35 编写于 作者: C Colin Ian King 提交者: Jakub Kicinski

octeontx2-af: Fix undetected unmap PF error check

Currently the check for an unmap PF error is always going to be false
because intr_val is a 32 bit int and is being bit-mask checked against
1ULL << 32.  Fix this by making intr_val a u64 to match the type at it
is copied from, namely npa_event_context->npa_af_rvu_ge.

Addresses-Coverity: ("Operands don't affect result")
Fixes: f1168d1e ("octeontx2-af: Add devlink health reporters for NPA")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Acked-by: NGeorge Cherian <george.cherian@marvell.com>
Link: https://lore.kernel.org/r/20201216123604.15369-1-colin.king@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 38ba95a4
......@@ -275,7 +275,8 @@ static int rvu_npa_report_show(struct devlink_fmsg *fmsg, void *ctx,
enum npa_af_rvu_health health_reporter)
{
struct rvu_npa_event_ctx *npa_event_context;
unsigned int intr_val, alloc_dis, free_dis;
unsigned int alloc_dis, free_dis;
u64 intr_val;
int err;
npa_event_context = ctx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册