Skip to content

Commit

Permalink
nvme-print-stdout: Use NVME_PMRSWTP register definitions to print
Browse files Browse the repository at this point in the history
Change it instead of hardcoded register mask and shift values.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed Mar 12, 2024
1 parent e671295 commit 0a7600f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1403,9 +1403,9 @@ static void stdout_registers_pmrebs(__u32 pmrebs)
static void stdout_registers_pmrswtp(__u32 pmrswtp)
{
printf("\tPMR Sustained Write Throughput (PMRSWTV): %x\n",
(pmrswtp & 0xffffff00) >> 8);
NVME_PMRSWTP_PMRSWTV(pmrswtp));
printf("\tPMR Sustained Write Throughput Units (PMRSWTU): %s/second\n",
nvme_register_pmr_pmrszu_to_string(pmrswtp & 0x0000000f));
nvme_register_pmr_pmrszu_to_string(NVME_PMRSWTP_PMRSWTU(pmrswtp)));
}

static void stdout_registers_pmrmscl(uint32_t pmrmscl)
Expand Down

0 comments on commit 0a7600f

Please sign in to comment.