Skip to contentSkip to conversation

md: Use existed macro instead of number

PATCH Applied kedacomkernel 2 participants 2 messages Feb 24, 2012 – Feb 26, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

From d5905ed3c5355a13e954057856733f8ad64a86ac Mon Sep 17 00:00:00 2001
From: majianpeng <[email protected]>
Date: Fri, 24 Feb 2012 22:49:45 +0800
Subject: [PATCH] md: Use existed macro instead of number

---
 include/linux/raid/md_p.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
include/linux/raid/md_p.h +4 -2
index 6f6df86..7c3577c 100644
@@ -281,6 +281,8 @@ struct mdp_superblock_1 {
 					    * active device with same 'role'.
 					    * 'recovery_offset' is also set.
 					    */
-#define	MD_FEATURE_ALL			(1|2|4|8|16)
-
+#define	MD_FEATURE_ALL			(MD_FEATURE_BITMAP_OFFSET | MD_FEATURE_RECOVERY_OFFSET | \
+					MD_FEATURE_RESHAPE_ACTIVE | MD_FEATURE_BAD_BLOCKS | \
+					MD_FEATURE_REPLACEMENT)
+
 #endif 
Signature · 6 lines
1.7.5.4

 				
--------------
kedacomkernel
2012-02-24
Applied
#1 lore raw
Quoted 16 lines · On Fri, 24 Feb 2012 15:00:21 +0800 "kedacomkernel" <[email protected]>…
Quoted 1 line

From d5905ed3c5355a13e954057856733f8ad64a86ac Mon Sep 17 00:00:00 2001

From: majianpeng <[email protected]>
Date: Fri, 24 Feb 2012 22:49:45 +0800
Subject: [PATCH] md: Use existed macro instead of number

---
 include/linux/raid/md_p.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
include/linux/raid/md_p.h +0 -0
index 6f6df86..7c3577c 100644

include/linux/raid/md_p.h struct mdp_superblock_1 { · line 288

Quoted 10 lines
include/linux/raid/md_p.h +4 -2
@@ -281,6 +281,8 @@ struct mdp_superblock_1 {
 					    * active device with same 'role'.
 					    * 'recovery_offset' is also set.
 					    */
-#define	MD_FEATURE_ALL			(1|2|4|8|16)
-
+#define	MD_FEATURE_ALL			(MD_FEATURE_BITMAP_OFFSET | MD_FEATURE_RECOVERY_OFFSET | \
+					MD_FEATURE_RESHAPE_ACTIVE | MD_FEATURE_BAD_BLOCKS | \
+					MD_FEATURE_REPLACEMENT)
+
 #endif 

Applied, thanks.
Though I reformatted it a bit.

NeilBrown

commit 473a5bfef64c6c328bc110f28ba6c32fe4d4508a

Author: majianpeng <[email protected]>
Date:   Mon Feb 27 09:56:59 2012 +1100

md: Use existed macros instead of numbers

include/linux/raid/md_p.h +5 -1
index 6f6df86..8c0a3ad 100644
@@ -281,6 +281,10 @@ struct mdp_superblock_1 {
 					    * active device with same 'role'.
 					    * 'recovery_offset' is also set.
 					    */
-#define	MD_FEATURE_ALL			(1|2|4|8|16)
+#define	MD_FEATURE_ALL			(MD_FEATURE_BITMAP_OFFSET	\
+					|MD_FEATURE_RECOVERY_OFFSET	\
+					|MD_FEATURE_RESHAPE_ACTIVE	\
+					|MD_FEATURE_BAD_BLOCKS		\
+					|MD_FEATURE_REPLACEMENT)
 
 #endif