From 1d208bb8b9ee6bade1339b8eb4d117973426ef1a Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Mon, 16 Sep 2024 21:10:29 +0900 Subject: [PATCH 1/2] build: bump libnvme wrap Include libnvme NVME_CHECK() definition addition. Signed-off-by: Tokunori Ikegami --- subprojects/libnvme.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libnvme.wrap b/subprojects/libnvme.wrap index 0d93535cd0..7a822def66 100644 --- a/subprojects/libnvme.wrap +++ b/subprojects/libnvme.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/linux-nvme/libnvme.git -revision = 5585f06a4f849a1b43b1a04f387d2f9b5829744f +revision = 8194960d93c9e4343d2cba456e7d1822b2e60563 [provide] libnvme = libnvme_dep From bacfd889bdd3216507ed135a89d83340ce681e52 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sun, 15 Sep 2024 10:45:24 +0900 Subject: [PATCH 2/2] nvme: use NVME_CHECK() to check get features select field value Use the macro instead of comparing the long filed value definition. Signed-off-by: Tokunori Ikegami --- nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvme.c b/nvme.c index c1f177f351..ab5602d015 100644 --- a/nvme.c +++ b/nvme.c @@ -4553,7 +4553,7 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg, cfg->cdw11 |= 0xff << 16; } - if (cfg->sel == NVME_GET_FEATURES_SEL_SUPPORTED) + if (NVME_CHECK(cfg->sel, GET_FEATURES_SEL, SUPPORTED)) cfg->data_len = 0; if (cfg->data_len) { @@ -4592,7 +4592,7 @@ static void get_feature_id_print(struct feat_cfg cfg, int err, __u32 result, if (!err) { if (!cfg.raw_binary || !buf) { nvme_feature_show(cfg.feature_id, cfg.sel, result); - if (cfg.sel == NVME_GET_FEATURES_SEL_SUPPORTED) + if (NVME_CHECK(cfg.sel, GET_FEATURES_SEL, SUPPORTED)) nvme_show_select_result(cfg.feature_id, result); else if (cfg.human_readable) nvme_feature_show_fields(cfg.feature_id, result,