[PATCH v2 1/1] nvme: move sysfs code to a dedicated sysfs.c file

Hannes Reinecke hare at suse.de
Wed Apr 26 04:27:32 PDT 2023


On 4/24/23 23:12, Max Gurtovoy wrote:
> 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 at kernel.org>
> Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
> ---
> 
> changes from v1:
>   - rephrase the title from "nvme: add a dedicated .c file for sysfs interface" (Sagi)
>   - add Reviewed-by signature from Keith
> 
> changes from RFC:
>   - Removed RCF tag
>   - updated copyrights mistake
>   - fix License copy/paste bug (Sagi)
> 
> ---
>   drivers/nvme/host/Makefile |   2 +-
>   drivers/nvme/host/core.c   | 650 +-----------------------------------
>   drivers/nvme/host/nvme.h   |   4 +
>   drivers/nvme/host/sysfs.c  | 655 +++++++++++++++++++++++++++++++++++++
>   4 files changed, 662 insertions(+), 649 deletions(-)
>   create mode 100644 drivers/nvme/host/sysfs.c
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes




More information about the Linux-nvme mailing list