Skip to content

Commit

Permalink
nvme-print-stdout: Use NVME_GET for MI commands supported and effects…
Browse files Browse the repository at this point in the history
… CSP

Use it with NVME_MI_CMD_SUPPORTED_EFFECTS register definitions existed.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Mar 19, 2024
1 parent aaa4664 commit cbe5bec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ static void stdout_mi_cmd_support_effects_log_human(__u32 mi_cmd_support)
printf(" NIC%s", (mi_cmd_support & NVME_MI_CMD_SUPPORTED_EFFECTS_NIC) ? set : clr);
printf(" CCC%s", (mi_cmd_support & NVME_MI_CMD_SUPPORTED_EFFECTS_CCC) ? set : clr);

csp = (mi_cmd_support >> NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_SHIFT) & NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_MASK;
csp = NVME_GET(mi_cmd_support, MI_CMD_SUPPORTED_EFFECTS_SCOPE);

printf(" NAMESPACE SCOPE%s", (csp & NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NS) ? set : clr);
printf(" CONTROLLER SCOPE%s", (csp & NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_CTRL) ? set : clr);
Expand Down

0 comments on commit cbe5bec

Please sign in to comment.