From: Israel Rukshin Date: Tue, 10 Mar 2020 14:39:10 +0000 (+0200) Subject: nvme: Use nvme_state_terminal helper X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e7c43feae2ab8744c3112b5a714959c8ea71ca19;p=linux.git nvme: Use nvme_state_terminal helper Improve code readability. Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Israel Rukshin Signed-off-by: Keith Busch --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index ad0847b6c769a..392af3cf0bf9f 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2633,8 +2633,7 @@ static bool nvme_validate_cntlid(struct nvme_subsystem *subsys, lockdep_assert_held(&nvme_subsystems_lock); list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) { - if (tmp->state == NVME_CTRL_DELETING || - tmp->state == NVME_CTRL_DEAD) + if (nvme_state_terminal(tmp)) continue; if (tmp->cntlid == ctrl->cntlid) {