Re: [PATCH 12/15] megaraid_sas: replace internal FALSE/TRUE definitions with false/true

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote:
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 
> ---
>  drivers/scsi/megaraid/megaraid_sas_fp.c | 40 
> +
>  1 file changed, 15 insertions(+), 25 deletions(-)
> Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
-- 
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)


[PATCH 12/15] megaraid_sas: replace internal FALSE/TRUE definitions with false/true

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai 
Signed-off-by: Shivasharan S 
---
 drivers/scsi/megaraid/megaraid_sas_fp.c | 40 +
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c 
b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 62affa7..ecc699a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -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 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_DATA_SIZE(map_, ld, index_)   (MR_LdSpanPtrGet(ld, index_, 
map)->spanRowDataSize)
 #define SPAN_INVALID  0xff
@@ -709,7 +699,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance 
*instance, u32 ld,
u32 pd, arRef, r1_alt_pd;
u8  physArm, span;
u64 row;
-   u8  retval = TRUE;
+   u8  retval = true;
u64 *pdBlock = _info->pdBlock;
__le16  *pDevHandle = _info->devHandle;
u8  *pPdInterface = _info->pd_interface;
@@ -727,7 +717,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance 
*instance, u32 ld,
if (raid->level == 6) {
logArm = get_arm_from_strip(instance, ld, stripRow, map);
if (logArm == -1U)
-   return FALSE;
+   return false;
rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod;
arm = armQ + 1 + logArm;
@@ -738,7 +728,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance 
*instance, u32 ld,
/* Calculate the arm */
physArm = get_arm(instance, ld, span, stripRow, map);
if (physArm == 0xFF)
-   return FALSE;
+   return false;
 
arRef   = MR_LdSpanArrayGet(ld, span, map);
pd  = MR_ArPdGet(arRef, physArm, map);
@@ -812,7 +802,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 
ld, u64 stripRow,
u32 pd, arRef, r1_alt_pd;
u8  physArm, span;
u64 row;
-   u8  retval = TRUE;
+   u8  retval = true;
u64 *pdBlock = _info->pdBlock;
__le16  *pDevHandle = _info->devHandle;
u8  *pPdInterface = _info->pd_interface;
@@ -829,7 +819,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 
ld, u64 stripRow,
u32 rowMod, armQ, arm;
 
if (raid->rowSize == 0)
-   return FALSE;
+   return false;
/* get logical row mod */
rowMod = mega_mod64(row, raid->rowSize);
armQ = raid->rowSize-1-rowMod; /* index of Q drive */
@@ -839,7 +829,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 
ld, u64 stripRow,
physArm = (u8)arm;
} else  {
if (raid->modFactor == 0)
-   return FALSE;
+   return false;
physArm = MR_LdDataArmGet(ld,  mega_mod64(stripRow,
  raid->modFactor),
  map);
@@ -851,7 +841,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 
ld, u64 stripRow,
} else {
span = (u8)MR_GetSpanBlock(ld, row, pdBlock, map);
if (span == SPAN_INVALID)
-   return FALSE;
+   return false;
}
 
/* Get the array on which this span is present */
@@ -954,7 +944,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
 */
if (raid->rowDataSize == 0) {
if (MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize == 0)
-   return FALSE;
+   return false;
else if (instance->UnevenSpanSupport) {
io_info->IoforUnevenSpan = 1;
} else {
@@ -963,7 +953,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
"rowDataSize = 0x%0x,"
"but there is _NO_ UnevenSpanSupport\n",
MR_LdSpanPtrGet(ld, 0, map)->spanRowDataSize);
-   return FALSE;
+   return false;
}
}
 
@@ -988,7 +978,7 @@ MR_BuildRaidContext(struct megasas_instance *instance,
dev_info(>pdev->dev, "return from %s %d."
"Send IO w/o region lock.\n",