]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
lnvm: cast identity structure to (void *) directly
authorMinwoo Im <minwoo.im.dev@gmail.com>
Sat, 20 Jul 2019 08:50:54 +0000 (17:50 +0900)
committerMinwoo Im <minwoo.im.dev@gmail.com>
Tue, 23 Jul 2019 14:31:29 +0000 (23:31 +0900)
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@kernel.org>
Cc: Matias Bjorling <mb@lightnvm.io>
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Javier González <javier@javigon.com>
nvme-lightnvm.c

index 0b99786fbab21e4f4411ab2c1c18d254ec6ae840..62bdc40401e2aad1b8ee493b688059b79ae99768 100644 (file)
@@ -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",