[PATCH 07/16] nvme-auth: remove redundant if statement
Sagi Grimberg
sagi at grimberg.me
Wed Nov 9 10:42:19 PST 2022
>> 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.
There if qid = 0 we want to pass NVME_QID_ANY because we don't want
__nvme_submit_sync_cmd to use blk_mq_alloc_request_hctx as we are
using the admin tagset.
More information about the Linux-nvme
mailing list