Commit ba1477aa authored by Shivasharan S's avatar Shivasharan S Committed by Martin K. Petersen

scsi: megaraid_sas: replace internal FALSE/TRUE definitions with false/true

Signed-off-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent eb3fe263
...@@ -67,16 +67,6 @@ MODULE_PARM_DESC(lb_pending_cmds, "Change raid-1 load balancing outstanding " ...@@ -67,16 +67,6 @@ MODULE_PARM_DESC(lb_pending_cmds, "Change raid-1 load balancing outstanding "
#define ABS_DIFF(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a))) #define ABS_DIFF(a, b) (((a) > (b)) ? ((a) - (b)) : ((b) - (a)))
#define MR_LD_STATE_OPTIMAL 3 #define MR_LD_STATE_OPTIMAL 3
#ifdef FALSE
#undef FALSE
#endif
#define FALSE 0
#ifdef TRUE
#undef TRUE
#endif
#define TRUE 1
#define SPAN_ROW_SIZE(map, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize) #define SPAN_ROW_SIZE(map, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowSize)
#define SPAN_ROW_DATA_SIZE(map_, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize) #define SPAN_ROW_DATA_SIZE(map_, ld, index_) (MR_LdSpanPtrGet(ld, index_, map)->spanRowDataSize)
#define SPAN_INVALID 0xff #define SPAN_INVALID 0xff
...@@ -709,7 +699,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, ...@@ -709,7 +699,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
u32 pd, arRef, r1_alt_pd; u32 pd, arRef, r1_alt_pd;
u8 physArm, span; u8 physArm, span;
u64 row; u64 row;
u8 retval = TRUE; u8 retval = true;
u64 *pdBlock = &io_info->pdBlock; u64 *pdBlock = &io_info->pdBlock;
__le16 *pDevHandle = &io_info->devHandle; __le16 *pDevHandle = &io_info->devHandle;
u8 *pPdInterface = &io_info->pd_interface; u8 *pPdInterface = &io_info->pd_interface;
...@@ -727,7 +717,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, ...@@ -727,7 +717,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
if (raid->level == 6) { if (raid->level == 6) {
logArm = get_arm_from_strip(instance, ld, stripRow, map); logArm = get_arm_from_strip(instance, ld, stripRow, map);
if (logArm == -1U) if (logArm == -1U)
return FALSE; return false;
rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod; armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod;
arm = armQ + 1 + logArm; arm = armQ + 1 + logArm;
...@@ -738,7 +728,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, ...@@ -738,7 +728,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld,
/* Calculate the arm */ /* Calculate the arm */
physArm = get_arm(instance, ld, span, stripRow, map); physArm = get_arm(instance, ld, span, stripRow, map);
if (physArm == 0xFF) if (physArm == 0xFF)
return FALSE; return false;
arRef = MR_LdSpanArrayGet(ld, span, map); arRef = MR_LdSpanArrayGet(ld, span, map);
pd = MR_ArPdGet(arRef, physArm, map); pd = MR_ArPdGet(arRef, physArm, map);
...@@ -812,7 +802,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, ...@@ -812,7 +802,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
u32 pd, arRef, r1_alt_pd; u32 pd, arRef, r1_alt_pd;
u8 physArm, span; u8 physArm, span;
u64 row; u64 row;
u8 retval = TRUE; u8 retval = true;
u64 *pdBlock = &io_info->pdBlock; u64 *pdBlock = &io_info->pdBlock;
__le16 *pDevHandle = &io_info->devHandle; __le16 *pDevHandle = &io_info->devHandle;
u8 *pPdInterface = &io_info->pd_interface; u8 *pPdInterface = &io_info->pd_interface;
...@@ -829,7 +819,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, ...@@ -829,7 +819,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
u32 rowMod, armQ, arm; u32 rowMod, armQ, arm;
if (raid->rowSize == 0) if (raid->rowSize == 0)
return FALSE; return false;
/* get logical row mod */ /* get logical row mod */
rowMod = mega_mod64(row, raid->rowSize); rowMod = mega_mod64(row, raid->rowSize);
armQ = raid->rowSize-1-rowMod; /* index of Q drive */ 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,7 +829,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
physArm = (u8)arm; physArm = (u8)arm;
} else { } else {
if (raid->modFactor == 0) if (raid->modFactor == 0)
return FALSE; return false;
physArm = MR_LdDataArmGet(ld, mega_mod64(stripRow, physArm = MR_LdDataArmGet(ld, mega_mod64(stripRow,
raid->modFactor), raid->modFactor),
map); map);
...@@ -851,7 +841,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, ...@@ -851,7 +841,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,
} else { } else {
span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map); span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map);
if (span == SPAN_INVALID) if (span == SPAN_INVALID)
return FALSE; return false;
} }
/* Get the array on which this span is present */ /* Get the array on which this span is present */
...@@ -954,7 +944,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -954,7 +944,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
*/ */
if (raid->rowDataSize == 0) { if (raid->rowDataSize == 0) {
if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0) if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0)
return FALSE; return false;
else if (instance->UnevenSpanSupport) { else if (instance->UnevenSpanSupport) {
io_info->IoforUnevenSpan = 1; io_info->IoforUnevenSpan = 1;
} else { } else {
...@@ -963,7 +953,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -963,7 +953,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
"rowDataSize = 0x%0x," "rowDataSize = 0x%0x,"
"but there is _NO_ UnevenSpanSupport\n", "but there is _NO_ UnevenSpanSupport\n",
MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize); MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize);
return FALSE; return false;
} }
} }
...@@ -988,7 +978,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -988,7 +978,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
dev_info(&instance->pdev->dev, "return from %s %d." dev_info(&instance->pdev->dev, "return from %s %d."
"Send IO w/o region lock.\n", "Send IO w/o region lock.\n",
__func__, __LINE__); __func__, __LINE__);
return FALSE; return false;
} }
if (raid->spanDepth == 1) { if (raid->spanDepth == 1) {
...@@ -1004,7 +994,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1004,7 +994,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
(unsigned long long)start_row, (unsigned long long)start_row,
(unsigned long long)start_strip, (unsigned long long)start_strip,
(unsigned long long)endStrip); (unsigned long long)endStrip);
return FALSE; return false;
} }
io_info->start_span = startlba_span; io_info->start_span = startlba_span;
io_info->start_row = start_row; io_info->start_row = start_row;
...@@ -1038,7 +1028,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1038,7 +1028,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
raid->capability. raid->capability.
fpWriteAcrossStripe)); fpWriteAcrossStripe));
} else } else
io_info->fpOkForIo = FALSE; io_info->fpOkForIo = false;
if (numRows == 1) { if (numRows == 1) {
/* single-strip IOs can always lock only the data needed */ /* single-strip IOs can always lock only the data needed */
...@@ -1124,7 +1114,7 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1124,7 +1114,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
pRAID_Context, map); pRAID_Context, map);
/* If IO on an invalid Pd, then FP is not possible.*/ /* If IO on an invalid Pd, then FP is not possible.*/
if (io_info->devHandle == MR_DEVHANDLE_INVALID) if (io_info->devHandle == MR_DEVHANDLE_INVALID)
io_info->fpOkForIo = FALSE; io_info->fpOkForIo = false;
return retval; return retval;
} else if (isRead) { } else if (isRead) {
uint stripIdx; uint stripIdx;
...@@ -1138,10 +1128,10 @@ MR_BuildRaidContext(struct megasas_instance *instance, ...@@ -1138,10 +1128,10 @@ MR_BuildRaidContext(struct megasas_instance *instance,
start_strip + stripIdx, ref_in_start_stripe, start_strip + stripIdx, ref_in_start_stripe,
io_info, pRAID_Context, map); io_info, pRAID_Context, map);
if (!retval) if (!retval)
return TRUE; return true;
} }
} }
return TRUE; return true;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment