nvmet: don't open-code NVME_NS_ATTR_RO enumeration
authorSagi Grimberg <sagi@grimberg.me>
Wed, 7 Dec 2022 11:28:23 +0000 (13:28 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Dec 2022 14:03:09 +0000 (15:03 +0100)
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>
drivers/nvme/target/admin-cmd.c

index 6b46f90..53a004e 100644 (file)
@@ -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));