[PATCH 07/16] nvme-auth: remove redundant if statement
Christoph Hellwig
hch at lst.de
Tue Nov 8 22:37:57 PST 2022
On Wed, Nov 09, 2022 at 05:44:10AM +0200, Sagi Grimberg wrote:
> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
> index a6312a8846f8..07d497f49e4b 100644
> --- a/drivers/nvme/host/auth.c
> +++ b/drivers/nvme/host/auth.c
> @@ -874,7 +874,7 @@ int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
> mutex_unlock(&ctrl->dhchap_auth_mutex);
> return -ENOMEM;
> }
> - chap->qid = (qid == NVME_QID_ANY) ? 0 : qid;
> + chap->qid = qid;
Btw, the same "transformation" can also be removed in nvme_auth_submit.
More information about the Linux-nvme
mailing list