summaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-06-29 00:21:04 +0300
committerJames Bottomley <JBottomley@Parallels.com>2013-07-09 12:14:06 +0100
commitfec3c1b4575431e2020c5c6502d18b281925ca45 (patch)
tree45f43058e09fb9e8bed2d91e048ae2a45f26ac48 /drivers/scsi/megaraid
parentbeb40ea42bd65511bc275a7d58d3753835906be5 (diff)
[SCSI] megaraid_sas: fix a bug for 64 bit arches
On 64 bit then -1UL and -1U are not equal, so these conditions don't work as intended and it breaks error handling. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sumit Saxena <sumit.saxena@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c
index 8056eacba758..4f401f753f8e 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fp.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fp.c
@@ -585,7 +585,7 @@ u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span, u64 stripe,
case 1:
/* start with logical arm */
arm = get_arm_from_strip(instance, ld, stripe, map);
- if (arm != -1UL)
+ if (arm != -1U)
arm *= 2;
break;
}
@@ -637,7 +637,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 == -1UL)
+ if (logArm == -1U)
return FALSE;
rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod;