Skip to content

Commit

Permalink
nvme: fix to use NVME_VAL() for CQ entry status field filter
Browse files Browse the repository at this point in the history
Previously used incorrectly NVME_GET() but not shifted the masked values.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Jan 2, 2025
1 parent e21db3e commit 515e5eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -4610,8 +4610,7 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg,

static int filter_out_flags(int status)
{
return status & (NVME_GET(NVME_SCT_MASK, SCT) |
NVME_GET(NVME_SC_MASK, SC));
return status & (NVME_VAL(SCT) | NVME_VAL(SC));
}

static void get_feature_id_print(struct feat_cfg cfg, int err, __u32 result, void *buf)
Expand Down

0 comments on commit 515e5eb

Please sign in to comment.