Skip to content

Commit ba1477a

Browse files
shivasharan-smartinkpetersen
authored andcommitted
scsi: megaraid_sas: replace internal FALSE/TRUE definitions with false/true
Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: Shivasharan S <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent eb3fe26 commit ba1477a

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

drivers/scsi/megaraid/megaraid_sas_fp.c

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,6 @@ MODULE_PARM_DESC(lb_pending_cmds, "Change raid-1 load balancing outstanding "
6767
#define ABS_DIFF(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
6868
#define MR_LD_STATE_OPTIMAL 3
6969

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-
8070
#define SPAN_ROW_SIZE(map, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize)
8171
#define SPAN_ROW_DATA_SIZE(map_, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize)
8272
#define SPAN_INVALID 0xff
@@ -709,7 +699,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
709699
u32 pd, arRef, r1_alt_pd;
710700
u8 physArm, span;
711701
u64 row;
712-
u8 retval = TRUE;
702+
u8 retval = true;
713703
u64 *pdBlock = &io_info->pdBlock;
714704
__le16 *pDevHandle = &io_info->devHandle;
715705
u8 *pPdInterface = &io_info->pd_interface;
@@ -727,7 +717,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
727717
if (raid->level == 6) {
728718
logArm = get_arm_from_strip(instance, ld, stripRow, map);
729719
if (logArm == -1U)
730-
return FALSE;
720+
return false;
731721
rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
732722
armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod;
733723
arm = armQ + 1 + logArm;
@@ -738,7 +728,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
738728
/* Calculate the arm */
739729
physArm = get_arm(instance, ld, span, stripRow, map);
740730
if (physArm == 0xFF)
741-
return FALSE;
731+
return false;
742732

743733
arRef = MR_LdSpanArrayGet(ld, span, map);
744734
pd = MR_ArPdGet(arRef, physArm, map);
@@ -812,7 +802,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
812802
u32 pd, arRef, r1_alt_pd;
813803
u8 physArm, span;
814804
u64 row;
815-
u8 retval = TRUE;
805+
u8 retval = true;
816806
u64 *pdBlock = &io_info->pdBlock;
817807
__le16 *pDevHandle = &io_info->devHandle;
818808
u8 *pPdInterface = &io_info->pd_interface;
@@ -829,7 +819,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
829819
u32 rowMod, armQ, arm;
830820

831821
if (raid->rowSize == 0)
832-
return FALSE;
822+
return false;
833823
/* get logical row mod */
834824
rowMod = mega_mod64(row, raid->rowSize);
835825
armQ = raid->rowSize-1-rowMod; /* index of Q drive */
@@ -839,7 +829,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
839829
physArm = (u8)arm;
840830
} else {
841831
if (raid->modFactor == 0)
842-
return FALSE;
832+
return false;
843833
physArm = MR_LdDataArmGet(ld, mega_mod64(stripRow,
844834
raid->modFactor),
845835
map);
@@ -851,7 +841,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
851841
} else {
852842
span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map);
853843
if (span == SPAN_INVALID)
854-
return FALSE;
844+
return false;
855845
}
856846

857847
/* Get the array on which this span is present */
@@ -954,7 +944,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
954944
*/
955945
if (raid->rowDataSize == 0) {
956946
if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0)
957-
return FALSE;
947+
return false;
958948
else if (instance->UnevenSpanSupport) {
959949
io_info->IoforUnevenSpan = 1;
960950
} else {
@@ -963,7 +953,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
963953
"rowDataSize = 0x%0x,"
964954
"but there is _NO_ UnevenSpanSupport\n",
965955
MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize);
966-
return FALSE;
956+
return false;
967957
}
968958
}
969959

@@ -988,7 +978,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
988978
dev_info(&instance->pdev->dev, "return from %s %d."
989979
"Send IO w/o region lock.\n",
990980
__func__, __LINE__);
991-
return FALSE;
981+
return false;
992982
}
993983

994984
if (raid->spanDepth == 1) {
@@ -1004,7 +994,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
1004994
(unsigned long long)start_row,
1005995
(unsigned long long)start_strip,
1006996
(unsigned long long)endStrip);
1007-
return FALSE;
997+
return false;
1008998
}
1009999
io_info->start_span = startlba_span;
10101000
io_info->start_row = start_row;
@@ -1038,7 +1028,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
10381028
raid->capability.
10391029
fpWriteAcrossStripe));
10401030
} else
1041-
io_info->fpOkForIo = FALSE;
1031+
io_info->fpOkForIo = false;
10421032

10431033
if (numRows == 1) {
10441034
/* single-strip IOs can always lock only the data needed */
@@ -1124,7 +1114,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
11241114
pRAID_Context, map);
11251115
/* If IO on an invalid Pd, then FP is not possible.*/
11261116
if (io_info->devHandle == MR_DEVHANDLE_INVALID)
1127-
io_info->fpOkForIo = FALSE;
1117+
io_info->fpOkForIo = false;
11281118
return retval;
11291119
} else if (isRead) {
11301120
uint stripIdx;
@@ -1138,10 +1128,10 @@ MR_BuildRaidContext(struct megasas_instance *instance,
11381128
start_strip + stripIdx, ref_in_start_stripe,
11391129
io_info, pRAID_Context, map);
11401130
if (!retval)
1141-
return TRUE;
1131+
return true;
11421132
}
11431133
}
1144-
return TRUE;
1134+
return true;
11451135
}
11461136

11471137
/*

0 commit comments

Comments
 (0)