summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2022-12-07 13:28:23 +0200
committerChristoph Hellwig <hch@lst.de>2022-12-07 15:03:09 +0100
commit19b00e0069a3819eac0e0ea685899aba29e545d6 (patch)
tree70a84053da74a63c2c1a176333a1ad1cfa180898 /drivers/nvme/target
parent0da7feaa5913090a2b97177ed3d7fa07b2d1d99c (diff)
downloadlinux-19b00e0069a3819eac0e0ea685899aba29e545d6.tar.bz2
nvmet: don't open-code NVME_NS_ATTR_RO enumeration
It is already there, just go ahead and use it. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r--drivers/nvme/target/admin-cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 6b46f90a63cf..53a004ea320c 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -561,7 +561,7 @@ static void nvmet_execute_identify_ns(struct nvmet_req *req)
}
if (req->ns->readonly)
- id->nsattr |= (1 << 0);
+ id->nsattr |= NVME_NS_ATTR_RO;
done:
if (!status)
status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));