From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH] nvme-cli: fix wrong bitmask in number of rpmb units.
Date: Sun, 29 Oct 2017 03:01:52 +0900 [thread overview]
Message-ID: <1509213712-32675-1-git-send-email-minwoo.im.dev@gmail.com> (raw)
Number of RPMB Units is a 3-bit field[02:00].
Bitmask should be 0111b(7h) to get this field.
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
nvme-print.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvme-print.c b/nvme-print.c
index 9f524cd..e79b3f4 100644
--- a/nvme-print.c
+++ b/nvme-print.c
@@ -218,7 +218,7 @@ static void show_nvme_id_ctrl_rpmbs(__le32 ctrl_rpmbs)
__u32 tsz = (rpmbs & 0xFF0000) >> 16;
__u32 rsvd = (rpmbs & 0xFFC0) >> 6;
__u32 auth = (rpmbs & 0x38) >> 3;
- __u32 rpmb = rpmbs & 0x3;
+ __u32 rpmb = rpmbs & 0x7;
printf(" [31:24]: %#x\tAccess Size\n", asz);
printf(" [23:16]: %#x\tTotal Size\n", tsz);
--
2.7.4
next reply other threads:[~2017-10-28 18:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-28 18:01 Minwoo Im [this message]
2017-10-30 19:36 ` [PATCH] nvme-cli: fix wrong bitmask in number of rpmb units Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509213712-32675-1-git-send-email-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox