]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: fix to use NVME_VAL() for CQ entry status field filter
authorTokunori Ikegami <ikegami.t@gmail.com>
Thu, 2 Jan 2025 13:41:41 +0000 (22:41 +0900)
committerDaniel Wagner <wagi@monom.org>
Fri, 3 Jan 2025 14:05:21 +0000 (15:05 +0100)
Previously used incorrectly NVME_GET() but not shifted the masked values.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index e10653ac211b806742aa25f1738b9f75c4b1178c..9b4f335a342d62c67c57d635adc11ac82c933d18 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -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)