nvme: move sysfs code to a dedicated sysfs.c file
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Mon, 24 Apr 2023 21:12:42 +0000 (00:12 +0300)
committerKeith Busch <kbusch@kernel.org>
Mon, 12 Jun 2023 17:36:59 +0000 (10:36 -0700)
commit942e21c042e6f735e13364e955cbd55a8930294b
tree79a2bf091d710b5703fd0e548f32ede7da8b9e5d
parentae8bd606e09bbdb2607c8249872cc2aeaf2fcc72
nvme: move sysfs code to a dedicated sysfs.c file

The core.c file became long and hard to maintain. Create a dedicated
file to centralize the sysfs functionality. This is a common practice to
separate sysfs/configfs related logic from the main driver logic .c file.
For example, in the nvmet module the configfs interface has its own
dedicated file.

This patch does not include any functional changes.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
[merged dhchap memleak fixes, include nvme-auth.h]
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/Makefile
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/sysfs.c [new file with mode: 0644]