[PATCH] NVMe: nvme_core_exit() should do cleanup in the reverseorder as nvme_core_init does

Wang Sheng-Hui shhuiw at foxmail.com
Sun May 1 17:18:36 PDT 2016


Christoph,

The order of the statements doesn't impact current implementation. 
No dependance between the data structures referred in each step.
It's kind of code cleanup.

Regards,
Wang Sheng-Hui

------------------ Original ------------------
From:  "Christoph Hellwig";<hch at infradead.org>;
Date:  Mon, May 2, 2016 02:05 AM
To:  "Wang Sheng-Hui"<shhuiw at foxmail.com>; 
Cc:  "keith.busch"<keith.busch at intel.com>; "axboe"<axboe at fb.com>; "linux-nvme"<linux-nvme at lists.infradead.org>; 
Subject:  Re: [PATCH] NVMe: nvme_core_exit() should do cleanup in the reverseorder as nvme_core_init does



On Thu, Apr 28, 2016 at 04:19:31PM +0800, Wang Sheng-Hui wrote:
> nvme_core_init does:
>     1) register_blkdev
>     2) __register_chrdev
>     3) class_create
> 
> nvme_core_exit should do cleanup in the reverse order.

Not sure why this would matter, but it looks correct to me:

Reviewed-by: Christoph Hellwig <hch at lst.de>

_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme


More information about the Linux-nvme mailing list