Skip to content

Commit f7c7953

Browse files
ikegami-tigaw
authored andcommitted
nvme: use NVME_GET_FEATURES_SEL_SUPPORTED definition
This is to delete the hardcoded values. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
1 parent b725f31 commit f7c7953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nvme.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4553,7 +4553,7 @@ static int get_feature_id(struct nvme_dev *dev, struct feat_cfg *cfg,
45534553
cfg->cdw11 |= 0xff << 16;
45544554
}
45554555

4556-
if (cfg->sel == 3)
4556+
if (cfg->sel == NVME_GET_FEATURES_SEL_SUPPORTED)
45574557
cfg->data_len = 0;
45584558

45594559
if (cfg->data_len) {
@@ -4592,7 +4592,7 @@ static void get_feature_id_print(struct feat_cfg cfg, int err, __u32 result,
45924592
if (!err) {
45934593
if (!cfg.raw_binary || !buf) {
45944594
nvme_feature_show(cfg.feature_id, cfg.sel, result);
4595-
if (cfg.sel == 3)
4595+
if (cfg.sel == NVME_GET_FEATURES_SEL_SUPPORTED)
45964596
nvme_show_select_result(cfg.feature_id, result);
45974597
else if (cfg.human_readable)
45984598
nvme_feature_show_fields(cfg.feature_id, result,

0 commit comments

Comments
 (0)