[PATCH 3/4] Change 'bool shutdown' into an enum shutdown_type { NVME_DISABLE_RESET = 0, NVME_DISABLE_SHUTDOWN_SYNC = 1 }.

Bjorn Helgaas helgaas at kernel.org
Wed Dec 27 11:33:44 PST 2023


The subject might be overly detailed and doesn't match the "nvme: ..."
prefix convention of drivers/nvme/.  Maybe it was intended as part of
the commit log?

On Thu, Dec 21, 2023 at 09:22:56AM -0800, Jeremy Allison wrote:
> Convert nvme_disable_ctrl() and nvme_dev_disable()
> inside drivers/nvme/host/pci.c to use this
> 
> bool shutdown = false == NVME_DISABLE_RESET
> bool shutdown = true == NVME_DISABLE_SHUTDOWN_SYNC.
> 
> This will make it easier to add a third request: NVME_DISABLE_SHUTDOWN_ASNYC
> later.
> 
> As nvme_disable_ctrl() is used outside of drivers/nvme/host/pci.c,
> convert the callers of nvme_disable_ctrl() to this convention too.
> 
> Signed-off-by: Jeremy Allison <jallison at ciq.com>
> ---
>  drivers/nvme/host/apple.c  |  4 ++--
>  drivers/nvme/host/core.c   |  6 +++---
>  drivers/nvme/host/nvme.h   |  7 +++++-
>  drivers/nvme/host/pci.c    | 44 +++++++++++++++++++-------------------
>  drivers/nvme/host/rdma.c   |  3 ++-
>  drivers/nvme/host/tcp.c    |  3 ++-
>  drivers/nvme/target/loop.c |  2 +-
>  7 files changed, 38 insertions(+), 31 deletions(-)
> ...



More information about the Linux-nvme mailing list