diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-06-28 17:21:04 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-07-09 07:14:06 -0400 |
commit | fec3c1b4575431e2020c5c6502d18b281925ca45 (patch) | |
tree | 45f43058e09fb9e8bed2d91e048ae2a45f26ac48 | |
parent | beb40ea42bd65511bc275a7d58d3753835906be5 (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>
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fp.c | 4 |
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, | |||
585 | case 1: | 585 | case 1: |
586 | /* start with logical arm */ | 586 | /* start with logical arm */ |
587 | arm = get_arm_from_strip(instance, ld, stripe, map); | 587 | arm = get_arm_from_strip(instance, ld, stripe, map); |
588 | if (arm != -1UL) | 588 | if (arm != -1U) |
589 | arm *= 2; | 589 | arm *= 2; |
590 | break; | 590 | break; |
591 | } | 591 | } |
@@ -637,7 +637,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, | |||
637 | 637 | ||
638 | if (raid->level == 6) { | 638 | if (raid->level == 6) { |
639 | logArm = get_arm_from_strip(instance, ld, stripRow, map); | 639 | logArm = get_arm_from_strip(instance, ld, stripRow, map); |
640 | if (logArm == -1UL) | 640 | if (logArm == -1U) |
641 | return FALSE; | 641 | return FALSE; |
642 | rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); | 642 | rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); |
643 | armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod; | 643 | armQ = SPAN_ROW_SIZE(map, ld, span) - 1 - rowMod; |