Skip to content

Commit

Permalink
nvme: use NVME_GET_FEATURES_SEL_SUPPORTED definition
Browse files Browse the repository at this point in the history
This is to delete the hardcoded values.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Sep 9, 2024
1 parent b725f31 commit f7c7953
Showing 1 changed file with 2 additions and 2 deletions.
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 == 3)
if (cfg->sel == NVME_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 == 3)
if (cfg.sel == NVME_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

0 comments on commit f7c7953

Please sign in to comment.