Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvme: use NVME_CHECK() to check get features select field value #2500

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion subprojects/libnvme.wrap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[wrap-git]
url = https://github.com/linux-nvme/libnvme.git
revision = 5585f06a4f849a1b43b1a04f387d2f9b5829744f
revision = 8194960d93c9e4343d2cba456e7d1822b2e60563

[provide]
libnvme = libnvme_dep
Expand Down