@@ -67,16 +67,6 @@ MODULE_PARM_DESC(lb_pending_cmds, "Change raid-1 load balancing outstanding "
67
67
#define ABS_DIFF (a , b ) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
68
68
#define MR_LD_STATE_OPTIMAL 3
69
69
70
- #ifdef FALSE
71
- #undef FALSE
72
- #endif
73
- #define FALSE 0
74
-
75
- #ifdef TRUE
76
- #undef TRUE
77
- #endif
78
- #define TRUE 1
79
-
80
70
#define SPAN_ROW_SIZE (map , ld , index_ ) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize)
81
71
#define SPAN_ROW_DATA_SIZE (map_ , ld , index_ ) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize)
82
72
#define SPAN_INVALID 0xff
@@ -709,7 +699,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
709
699
u32 pd , arRef , r1_alt_pd ;
710
700
u8 physArm , span ;
711
701
u64 row ;
712
- u8 retval = TRUE ;
702
+ u8 retval = true ;
713
703
u64 * pdBlock = & io_info -> pdBlock ;
714
704
__le16 * pDevHandle = & io_info -> devHandle ;
715
705
u8 * pPdInterface = & io_info -> pd_interface ;
@@ -727,7 +717,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
727
717
if (raid -> level == 6 ) {
728
718
logArm = get_arm_from_strip (instance , ld , stripRow , map );
729
719
if (logArm == -1U )
730
- return FALSE ;
720
+ return false ;
731
721
rowMod = mega_mod64 (row , SPAN_ROW_SIZE (map , ld , span ));
732
722
armQ = SPAN_ROW_SIZE (map , ld , span ) - 1 - rowMod ;
733
723
arm = armQ + 1 + logArm ;
@@ -738,7 +728,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
738
728
/* Calculate the arm */
739
729
physArm = get_arm (instance , ld , span , stripRow , map );
740
730
if (physArm == 0xFF )
741
- return FALSE ;
731
+ return false ;
742
732
743
733
arRef = MR_LdSpanArrayGet (ld , span , map );
744
734
pd = MR_ArPdGet (arRef , physArm , map );
@@ -812,7 +802,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
812
802
u32 pd , arRef , r1_alt_pd ;
813
803
u8 physArm , span ;
814
804
u64 row ;
815
- u8 retval = TRUE ;
805
+ u8 retval = true ;
816
806
u64 * pdBlock = & io_info -> pdBlock ;
817
807
__le16 * pDevHandle = & io_info -> devHandle ;
818
808
u8 * pPdInterface = & io_info -> pd_interface ;
@@ -829,7 +819,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
829
819
u32 rowMod , armQ , arm ;
830
820
831
821
if (raid -> rowSize == 0 )
832
- return FALSE ;
822
+ return false ;
833
823
/* get logical row mod */
834
824
rowMod = mega_mod64 (row , raid -> rowSize );
835
825
armQ = raid -> rowSize - 1 - rowMod ; /* index of Q drive */
@@ -839,7 +829,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
839
829
physArm = (u8 )arm ;
840
830
} else {
841
831
if (raid -> modFactor == 0 )
842
- return FALSE ;
832
+ return false ;
843
833
physArm = MR_LdDataArmGet (ld , mega_mod64 (stripRow ,
844
834
raid -> modFactor ),
845
835
map );
@@ -851,7 +841,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
851
841
} else {
852
842
span = (u8 )MR_GetSpanBlock (ld , row , pdBlock , map );
853
843
if (span == SPAN_INVALID )
854
- return FALSE ;
844
+ return false ;
855
845
}
856
846
857
847
/* Get the array on which this span is present */
@@ -954,7 +944,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
954
944
*/
955
945
if (raid -> rowDataSize == 0 ) {
956
946
if (MR_LdSpanPtrGet (ld , 0 , map )-> spanRowDataSize == 0 )
957
- return FALSE ;
947
+ return false ;
958
948
else if (instance -> UnevenSpanSupport ) {
959
949
io_info -> IoforUnevenSpan = 1 ;
960
950
} else {
@@ -963,7 +953,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
963
953
"rowDataSize = 0x%0x,"
964
954
"but there is _NO_ UnevenSpanSupport\n" ,
965
955
MR_LdSpanPtrGet (ld , 0 , map )-> spanRowDataSize );
966
- return FALSE ;
956
+ return false ;
967
957
}
968
958
}
969
959
@@ -988,7 +978,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
988
978
dev_info (& instance -> pdev -> dev , "return from %s %d."
989
979
"Send IO w/o region lock.\n" ,
990
980
__func__ , __LINE__ );
991
- return FALSE ;
981
+ return false ;
992
982
}
993
983
994
984
if (raid -> spanDepth == 1 ) {
@@ -1004,7 +994,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
1004
994
(unsigned long long )start_row ,
1005
995
(unsigned long long )start_strip ,
1006
996
(unsigned long long )endStrip );
1007
- return FALSE ;
997
+ return false ;
1008
998
}
1009
999
io_info -> start_span = startlba_span ;
1010
1000
io_info -> start_row = start_row ;
@@ -1038,7 +1028,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
1038
1028
raid -> capability .
1039
1029
fpWriteAcrossStripe ));
1040
1030
} else
1041
- io_info -> fpOkForIo = FALSE ;
1031
+ io_info -> fpOkForIo = false ;
1042
1032
1043
1033
if (numRows == 1 ) {
1044
1034
/* single-strip IOs can always lock only the data needed */
@@ -1124,7 +1114,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
1124
1114
pRAID_Context , map );
1125
1115
/* If IO on an invalid Pd, then FP is not possible.*/
1126
1116
if (io_info -> devHandle == MR_DEVHANDLE_INVALID )
1127
- io_info -> fpOkForIo = FALSE ;
1117
+ io_info -> fpOkForIo = false ;
1128
1118
return retval ;
1129
1119
} else if (isRead ) {
1130
1120
uint stripIdx ;
@@ -1138,10 +1128,10 @@ MR_BuildRaidContext(struct megasas_instance *instance,
1138
1128
start_strip + stripIdx , ref_in_start_stripe ,
1139
1129
io_info , pRAID_Context , map );
1140
1130
if (!retval )
1141
- return TRUE ;
1131
+ return true ;
1142
1132
}
1143
1133
}
1144
- return TRUE ;
1134
+ return true ;
1145
1135
}
1146
1136
1147
1137
/*
0 commit comments