Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH 3/4] lnvm: cast identity structure to (void *) directly
Date: Mon, 22 Jul 2019 00:26:48 +0900	[thread overview]
Message-ID: <20190721152649.4894-4-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <20190721152649.4894-3-minwoo.im.dev@gmail.com>

If we use "tmp" or something like this, we can expect that it just
stores the previous pointer and do something else with the previous
pointer.  But, in this function, it just to cast it out.

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>
---
 nvme-lightnvm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nvme-lightnvm.c b/nvme-lightnvm.c
index 0b99786..62bdc40 100644
--- a/nvme-lightnvm.c
+++ b/nvme-lightnvm.c
@@ -422,13 +422,12 @@ static void show_lnvm_id20_ns(struct nvme_nvm_id20 *id, unsigned int flags)
 
 static void show_lnvm_id_ns(struct nvme_nvm_id *id, unsigned int flags)
 {
-	void *tmp = id;
 	switch (id->ver_id) {
 		case 1:
-			show_lnvm_id12_ns(tmp, flags);
+			show_lnvm_id12_ns((void *) id, flags);
 		break;
 		case 2:
-			show_lnvm_id20_ns(tmp, flags);
+			show_lnvm_id20_ns((void *) id, flags);
 		break;
 		default:
 			fprintf(stderr, "Version %d not supported.\n",
-- 
2.17.1

  reply	other threads:[~2019-07-21 15:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-21 15:26 [PATCH 0/4] lnvm: minor clean-ups Minwoo Im
2019-07-21 15:26 ` [PATCH 1/4] lnvm: remove redundant whitespace in lnvm_init() Minwoo Im
2019-07-21 15:26   ` [PATCH 2/4] lnvm: do not print 0 when the arg is not given Minwoo Im
2019-07-21 15:26     ` Minwoo Im [this message]
2019-07-21 15:26       ` [PATCH 4/4] lnvm: sync-up uapi lightnvm.h header from kernel Minwoo Im
2019-07-21 15:28 ` [PATCH 0/4] lnvm: minor clean-ups Minwoo Im
  -- strict thread matches above, loose matches on Subject: below --
2019-07-21 15:32 [PATCH V2 " Minwoo Im
2019-07-21 15:32 ` [PATCH 3/4] lnvm: cast identity structure to (void *) directly Minwoo Im
2019-07-23  5:44   ` Javier González

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=20190721152649.4894-4-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