From 19b00e0069a3819eac0e0ea685899aba29e545d6 Mon Sep 17 00:00:00 2001 From: Sagi Grimberg Date: Wed, 7 Dec 2022 13:28:23 +0200 Subject: [PATCH] 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 Signed-off-by: Christoph Hellwig --- drivers/nvme/target/admin-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 6b46f90..53a004e 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)); -- 2.7.4