From 8f5b48f8fd168550851b3130b913c3b71cb4a2c9 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 11 Feb 2021 08:58:53 +0000 Subject: [PATCH] nvme: make enum spdk_nvme_ns_flags more readable Make enum spdk_nvme_ns_flags more readable. Other enums in spdk, e.g. enum spdk_nvme_ctrlr_flags, and e.g. enum NVME_RDMA_COMPLETION_FLAGS, already define the enum values using bit shifts. Do the same for enum spdk_nvme_ns_flags. No functional change intended. Signed-off-by: Niklas Cassel Change-Id: Ia78ab0bab6fa37d700178d5b2669feb5a3003871 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6383 Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker Reviewed-by: Jim Harris Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- include/spdk/nvme.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index 0866d87c4..978a532aa 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -2491,16 +2491,16 @@ enum spdk_nvme_csi spdk_nvme_ns_get_csi(const struct spdk_nvme_ns *ns); * \brief Namespace command support flags. */ enum spdk_nvme_ns_flags { - SPDK_NVME_NS_DEALLOCATE_SUPPORTED = 0x1, /**< The deallocate command is supported */ - SPDK_NVME_NS_FLUSH_SUPPORTED = 0x2, /**< The flush command is supported */ - SPDK_NVME_NS_RESERVATION_SUPPORTED = 0x4, /**< The reservation command is supported */ - SPDK_NVME_NS_WRITE_ZEROES_SUPPORTED = 0x8, /**< The write zeroes command is supported */ - SPDK_NVME_NS_DPS_PI_SUPPORTED = 0x10, /**< The end-to-end data protection is supported */ - SPDK_NVME_NS_EXTENDED_LBA_SUPPORTED = 0x20, /**< The extended lba format is supported, + SPDK_NVME_NS_DEALLOCATE_SUPPORTED = 1 << 0, /**< The deallocate command is supported */ + SPDK_NVME_NS_FLUSH_SUPPORTED = 1 << 1, /**< The flush command is supported */ + SPDK_NVME_NS_RESERVATION_SUPPORTED = 1 << 2, /**< The reservation command is supported */ + SPDK_NVME_NS_WRITE_ZEROES_SUPPORTED = 1 << 3, /**< The write zeroes command is supported */ + SPDK_NVME_NS_DPS_PI_SUPPORTED = 1 << 4, /**< The end-to-end data protection is supported */ + SPDK_NVME_NS_EXTENDED_LBA_SUPPORTED = 1 << 5, /**< The extended lba format is supported, metadata is transferred as a contiguous part of the logical block that it is associated with */ - SPDK_NVME_NS_WRITE_UNCORRECTABLE_SUPPORTED = 0x40, /**< The write uncorrectable command is supported */ - SPDK_NVME_NS_COMPARE_SUPPORTED = 0x80, /**< The compare command is supported */ + SPDK_NVME_NS_WRITE_UNCORRECTABLE_SUPPORTED = 1 << 6, /**< The write uncorrectable command is supported */ + SPDK_NVME_NS_COMPARE_SUPPORTED = 1 << 7, /**< The compare command is supported */ }; /**