dm vdo: use #define for NO_CHAPTER and NO_CHAPTER_INDEX_ENTRY
authorMike Snitzer <snitzer@kernel.org>
Wed, 7 Feb 2024 16:12:44 +0000 (11:12 -0500)
committerMike Snitzer <snitzer@kernel.org>
Tue, 20 Feb 2024 18:43:18 +0000 (13:43 -0500)
Avoids unconventional use of 'static const' and enum in headers.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
drivers/md/dm-vdo/chapter-index.h
drivers/md/dm-vdo/volume-index.h

index e1bc7e31a2a53fc5dcd99a143e1c02498ad4af02..be8bf2b675b1c787a71afbc159ff4bb7d52f4ac5 100644 (file)
  * is more efficient. Both types of chapter index are implemented with a delta index.
  */
 
-enum {
-       /* The value returned when no entry is found in the chapter index. */
-       NO_CHAPTER_INDEX_ENTRY = U16_MAX,
-};
+/* The value returned when no entry is found in the chapter index. */
+#define NO_CHAPTER_INDEX_ENTRY U16_MAX
 
 struct open_chapter_index {
        const struct index_geometry *geometry;
index 0f08acf29435e732469d592a9d6bf2dd8f455a49..537e9947cf4a3a99e53d03c9580b3d4d5227e9d9 100644 (file)
@@ -26,7 +26,7 @@
  * managed with volume_index_record structures.
  */
 
-static const u64 NO_CHAPTER = U64_MAX;
+#define NO_CHAPTER U64_MAX
 
 struct volume_index_stats {
        /* Nanoseconds spent rebalancing */