Skip to content

Commit

Permalink
nvme-print-stdout: Use NVME_PMRMSC 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 <ikegami.t@gmail.com>
  • Loading branch information
ikegami-t authored and igaw committed Mar 12, 2024
1 parent 0a7600f commit 2af3218
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nvme-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,9 +1411,8 @@ static void stdout_registers_pmrswtp(__u32 pmrswtp)
static void stdout_registers_pmrmscl(uint32_t pmrmscl)
{
printf("\tController Base Address (CBA): %#x\n",
(pmrmscl & 0xfffff000) >> 12);
printf("\tController Memory Space Enable (CMSE): %#x\n\n",
(pmrmscl & 0x00000002) >> 1);
(uint32_t)NVME_PMRMSC_CBA(pmrmscl));
printf("\tController Memory Space Enable (CMSE): %#x\n\n", NVME_PMRMSC_CMSE(pmrmscl));
}

static void stdout_registers_pmrmscu(uint32_t pmrmscu)
Expand Down

0 comments on commit 2af3218

Please sign in to comment.