From 35596d34b0932ab0e79069a45e26d1f409ecd010 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Wed, 18 Nov 2020 11:28:20 +0000 Subject: [PATCH] nvme: make enum spdk_nvme_ctrlr_flags more readable Make enum spdk_nvme_ctrlr_flags more readable. Other enums in spdk, e.g. enum accel_capability, and enum NVME_RDMA_COMPLETION_FLAGS, already define the enum values using bit shifts. Do the same for enum spdk_nvme_ctrlr_flags. No functional change intended. Signed-off-by: Niklas Cassel Change-Id: Ida7d7e4ff7f4cffce85cb2d6ea2bc0168875fdb8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5158 Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Shuhei Matsumoto Reviewed-by: Paul Luse Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- include/spdk/nvme.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index 21c3714c9..0eb949ef2 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -420,11 +420,11 @@ struct spdk_nvme_host_id { * Used for identifying if the controller supports these flags. */ enum spdk_nvme_ctrlr_flags { - SPDK_NVME_CTRLR_SGL_SUPPORTED = 0x1, /**< SGL is supported */ - SPDK_NVME_CTRLR_SECURITY_SEND_RECV_SUPPORTED = 0x2, /**< security send/receive is supported */ - SPDK_NVME_CTRLR_WRR_SUPPORTED = 0x4, /**< Weighted Round Robin is supported */ - SPDK_NVME_CTRLR_COMPARE_AND_WRITE_SUPPORTED = 0x8, /**< Compare and write fused operations supported */ - SPDK_NVME_CTRLR_SGL_REQUIRES_DWORD_ALIGNMENT = 0x10, /**< Dword alignment is required for SGL */ + SPDK_NVME_CTRLR_SGL_SUPPORTED = 1 << 0, /**< SGL is supported */ + SPDK_NVME_CTRLR_SECURITY_SEND_RECV_SUPPORTED = 1 << 1, /**< security send/receive is supported */ + SPDK_NVME_CTRLR_WRR_SUPPORTED = 1 << 2, /**< Weighted Round Robin is supported */ + SPDK_NVME_CTRLR_COMPARE_AND_WRITE_SUPPORTED = 1 << 3, /**< Compare and write fused operations supported */ + SPDK_NVME_CTRLR_SGL_REQUIRES_DWORD_ALIGNMENT = 1 << 4, /**< Dword alignment is required for SGL */ }; /**