diff options
author | Christoph Hellwig <hch@lst.de> | 2022-09-20 15:38:58 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-09-27 09:22:09 +0200 |
commit | 1c32a8012b7fabe469b6af826edfd4ae2a6201d3 (patch) | |
tree | b0b8916ef9b48caa7dda30b51bcec75664b99317 /drivers/nvme | |
parent | 1befd944e05050d76950014f3dc04ed47faba2c3 (diff) | |
download | linux-1c32a8012b7fabe469b6af826edfd4ae2a6201d3.tar.bz2 |
nvme: improve the NVME_CONNECT_AUTHREQ* definitions
Mark them as unsigned so that we don't need extra casts, and define
them relative to cdword0 instead of requiring extra shifts.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/fabrics-cmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c index c7e903589d37..618f7adca70f 100644 --- a/drivers/nvme/target/fabrics-cmd.c +++ b/drivers/nvme/target/fabrics-cmd.c @@ -272,8 +272,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req) req->cqe->result.u16 = cpu_to_le16(ctrl->cntlid); if (nvmet_has_auth(ctrl)) - req->cqe->result.u32 |= - cpu_to_le32((u32)NVME_CONNECT_AUTHREQ_ATR << 16); + req->cqe->result.u32 |= cpu_to_le32(NVME_CONNECT_AUTHREQ_ATR); out: kfree(d); complete: @@ -334,8 +333,7 @@ static void nvmet_execute_io_connect(struct nvmet_req *req) pr_debug("adding queue %d to ctrl %d.\n", qid, ctrl->cntlid); if (nvmet_has_auth(ctrl)) - req->cqe->result.u32 |= - cpu_to_le32((u32)NVME_CONNECT_AUTHREQ_ATR << 16); + req->cqe->result.u32 |= cpu_to_le32(NVME_CONNECT_AUTHREQ_ATR); out: kfree(d); |