diff options
author | Shivasharan S <shivasharan.srikanteshwara@broadcom.com> | 2017-02-10 03:59:25 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-02-13 07:26:22 -0500 |
commit | 50b7f5a2d0126b893a4591336b1cdb4028a726b0 (patch) | |
tree | 3b87e3d97777e247acb9c7b87b1e238e7d1fea8d | |
parent | b41c0a4aa7c0fc1f98648c020358598498d48f06 (diff) |
scsi: megaraid_sas: Change max_cmd from u32 to u16 in all functions
Since maximum supported FW commands are all defined as u16, change
all local variables referring to max_cmd from u32 to u16.
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 10 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index cd9d223d4370..06001b4f9cad 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -1549,7 +1549,7 @@ megasas_dump_pending_frames(struct megasas_instance *instance) | |||
1549 | struct megasas_io_frame *ldio; | 1549 | struct megasas_io_frame *ldio; |
1550 | struct megasas_pthru_frame *pthru; | 1550 | struct megasas_pthru_frame *pthru; |
1551 | u32 sgcount; | 1551 | u32 sgcount; |
1552 | u32 max_cmd = instance->max_fw_cmds; | 1552 | u16 max_cmd = instance->max_fw_cmds; |
1553 | 1553 | ||
1554 | dev_err(&instance->pdev->dev, "[%d]: Dumping Frame Phys Address of all pending cmds in FW\n",instance->host->host_no); | 1554 | dev_err(&instance->pdev->dev, "[%d]: Dumping Frame Phys Address of all pending cmds in FW\n",instance->host->host_no); |
1555 | dev_err(&instance->pdev->dev, "[%d]: Total OS Pending cmds : %d\n",instance->host->host_no,atomic_read(&instance->fw_outstanding)); | 1555 | dev_err(&instance->pdev->dev, "[%d]: Total OS Pending cmds : %d\n",instance->host->host_no,atomic_read(&instance->fw_outstanding)); |
@@ -3467,7 +3467,7 @@ megasas_internal_reset_defer_cmds(struct megasas_instance *instance) | |||
3467 | { | 3467 | { |
3468 | struct megasas_cmd *cmd; | 3468 | struct megasas_cmd *cmd; |
3469 | int i; | 3469 | int i; |
3470 | u32 max_cmd = instance->max_fw_cmds; | 3470 | u16 max_cmd = instance->max_fw_cmds; |
3471 | u32 defer_index; | 3471 | u32 defer_index; |
3472 | unsigned long flags; | 3472 | unsigned long flags; |
3473 | 3473 | ||
@@ -3843,7 +3843,7 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) | |||
3843 | static void megasas_teardown_frame_pool(struct megasas_instance *instance) | 3843 | static void megasas_teardown_frame_pool(struct megasas_instance *instance) |
3844 | { | 3844 | { |
3845 | int i; | 3845 | int i; |
3846 | u32 max_cmd = instance->max_mfi_cmds; | 3846 | u16 max_cmd = instance->max_mfi_cmds; |
3847 | struct megasas_cmd *cmd; | 3847 | struct megasas_cmd *cmd; |
3848 | 3848 | ||
3849 | if (!instance->frame_dma_pool) | 3849 | if (!instance->frame_dma_pool) |
@@ -3887,7 +3887,7 @@ static void megasas_teardown_frame_pool(struct megasas_instance *instance) | |||
3887 | static int megasas_create_frame_pool(struct megasas_instance *instance) | 3887 | static int megasas_create_frame_pool(struct megasas_instance *instance) |
3888 | { | 3888 | { |
3889 | int i; | 3889 | int i; |
3890 | u32 max_cmd; | 3890 | u16 max_cmd; |
3891 | u32 sge_sz; | 3891 | u32 sge_sz; |
3892 | u32 total_sz; | 3892 | u32 total_sz; |
3893 | u32 frame_count; | 3893 | u32 frame_count; |
@@ -4021,7 +4021,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance) | |||
4021 | { | 4021 | { |
4022 | int i; | 4022 | int i; |
4023 | int j; | 4023 | int j; |
4024 | u32 max_cmd; | 4024 | u16 max_cmd; |
4025 | struct megasas_cmd *cmd; | 4025 | struct megasas_cmd *cmd; |
4026 | struct fusion_context *fusion; | 4026 | struct fusion_context *fusion; |
4027 | 4027 | ||
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index baea4c2137d7..2d6d979c6ca8 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c | |||
@@ -367,7 +367,7 @@ megasas_free_cmds_fusion(struct megasas_instance *instance) | |||
367 | static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) | 367 | static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) |
368 | { | 368 | { |
369 | int i; | 369 | int i; |
370 | u32 max_cmd; | 370 | u16 max_cmd; |
371 | struct fusion_context *fusion; | 371 | struct fusion_context *fusion; |
372 | struct megasas_cmd_fusion *cmd; | 372 | struct megasas_cmd_fusion *cmd; |
373 | 373 | ||
@@ -1274,7 +1274,8 @@ megasas_init_adapter_fusion(struct megasas_instance *instance) | |||
1274 | { | 1274 | { |
1275 | struct megasas_register_set __iomem *reg_set; | 1275 | struct megasas_register_set __iomem *reg_set; |
1276 | struct fusion_context *fusion; | 1276 | struct fusion_context *fusion; |
1277 | u32 max_cmd, scratch_pad_2; | 1277 | u16 max_cmd; |
1278 | u32 scratch_pad_2; | ||
1278 | int i = 0, count; | 1279 | int i = 0, count; |
1279 | 1280 | ||
1280 | fusion = instance->ctrl_context; | 1281 | fusion = instance->ctrl_context; |