All of lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH V3 1/3] lnvm: make data_len to sizeof() instead of magic number
Date: Sun, 28 Jul 2019 15:35:14 +0900	[thread overview]
Message-ID: <20190728063516.17732-2-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <20190728063516.17732-1-minwoo.im.dev@gmail.com>

We can have it as a sizeof() instead of the hard-coded value for the
data structure.

Cc: Keith Busch <kbusch at kernel.org>
Cc: Matias Bjorling <mb at lightnvm.io>
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
Signed-off-by: Matias Bj?rling <matias.bjorling at wdc.com>
Reviewed-by: Javier Gonz?lez <javier at javigon.com>
---
 nvme-lightnvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nvme-lightnvm.c b/nvme-lightnvm.c
index 0b99786..e8cdccd 100644
--- a/nvme-lightnvm.c
+++ b/nvme-lightnvm.c
@@ -442,7 +442,7 @@ static int lnvm_get_identity(int fd, int nsid, struct nvme_nvm_id *nvm_id)
 		.opcode		= nvme_nvm_admin_identity,
 		.nsid		= nsid,
 		.addr		= (__u64)(uintptr_t)nvm_id,
-		.data_len	= 0x1000,
+		.data_len	= sizeof(struct nvme_nvm_id),
 	};
 
 	return nvme_submit_passthru(fd, NVME_IOCTL_ADMIN_CMD, &cmd);
-- 
2.17.1

  reply	other threads:[~2019-07-28  6:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28  6:35 [PATCH V3 0/3] nvme-cli: lnvm: introduce chunk-log command Minwoo Im
2019-07-28  6:35 ` Minwoo Im [this message]
2019-07-28  6:35 ` [PATCH V3 2/3] lnvm: introduce chunk-log command for chunk info Minwoo Im
2019-07-28  6:35 ` [PATCH V3 3/3] lnvm: introduce alias geometry for id-ns for lnvm Minwoo Im
2019-07-28  6:36   ` Minwoo Im

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=20190728063516.17732-2-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 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.