* [PATCH] nvme-cli: fix ana-log endianness
@ 2018-10-24 18:47 Chaitanya Kulkarni
2018-10-24 21:56 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Kulkarni @ 2018-10-24 18:47 UTC (permalink / raw)
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nvme.c b/nvme.c
index 4b2d1d2..c961cc5 100644
--- a/nvme.c
+++ b/nvme.c
@@ -273,7 +273,7 @@ static int get_ana_log(int argc, char **argv, struct command *cmd,
ana_log_len = sizeof(struct nvme_ana_rsp_hdr) +
le32_to_cpu(ctrl.nanagrpid) * sizeof(struct nvme_ana_group_desc);
if (!(ctrl.anacap & (1 << 6)))
- ana_log_len += ctrl.mnan * sizeof(__le32);
+ ana_log_len += le32_to_cpu(ctrl.mnan) * sizeof(__le32);
ana_log = malloc(ana_log_len);
if (!ana_log) {
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] nvme-cli: fix ana-log endianness
2018-10-24 18:47 [PATCH] nvme-cli: fix ana-log endianness Chaitanya Kulkarni
@ 2018-10-24 21:56 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2018-10-24 21:56 UTC (permalink / raw)
Applied, thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-24 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 18:47 [PATCH] nvme-cli: fix ana-log endianness Chaitanya Kulkarni
2018-10-24 21:56 ` Keith Busch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.