]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: megaraid_sas: Change max_cmd from u32 to u16 in all functions
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 10 Feb 2017 08:59:25 +0000 (00:59 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 21:06:07 +0000 (14:06 -0700)
Orabug: 26096381

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>
(cherry picked from commit 50b7f5a2d0126b893a4591336b1cdb4028a726b0)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c

index d9550d69416676b126daaf58e717180b55dbe5ee..32f7a2cfbb62c768d1059a92f4cf80ae11d96cea 100644 (file)
@@ -1548,7 +1548,7 @@ megasas_dump_pending_frames(struct megasas_instance *instance)
        struct megasas_io_frame *ldio;
        struct megasas_pthru_frame *pthru;
        u32 sgcount;
-       u32 max_cmd = instance->max_fw_cmds;
+       u16 max_cmd = instance->max_fw_cmds;
 
        dev_err(&instance->pdev->dev, "[%d]: Dumping Frame Phys Address of all pending cmds in FW\n",instance->host->host_no);
        dev_err(&instance->pdev->dev, "[%d]: Total OS Pending cmds : %d\n",instance->host->host_no,atomic_read(&instance->fw_outstanding));
@@ -3389,7 +3389,7 @@ megasas_internal_reset_defer_cmds(struct megasas_instance *instance)
 {
        struct megasas_cmd *cmd;
        int i;
-       u32 max_cmd = instance->max_fw_cmds;
+       u16 max_cmd = instance->max_fw_cmds;
        u32 defer_index;
        unsigned long flags;
 
@@ -3765,7 +3765,7 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
 static void megasas_teardown_frame_pool(struct megasas_instance *instance)
 {
        int i;
-       u32 max_cmd = instance->max_mfi_cmds;
+       u16 max_cmd = instance->max_mfi_cmds;
        struct megasas_cmd *cmd;
 
        if (!instance->frame_dma_pool)
@@ -3809,7 +3809,7 @@ static void megasas_teardown_frame_pool(struct megasas_instance *instance)
 static int megasas_create_frame_pool(struct megasas_instance *instance)
 {
        int i;
-       u32 max_cmd;
+       u16 max_cmd;
        u32 sge_sz;
        u32 total_sz;
        u32 frame_count;
@@ -3943,7 +3943,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
 {
        int i;
        int j;
-       u32 max_cmd;
+       u16 max_cmd;
        struct megasas_cmd *cmd;
        struct fusion_context *fusion;
 
index 29de181e216355ca0f805fd885a152842d4ed12c..72e4a28a78b5d7ce9e4b3a77df4f7e30ddb5df52 100644 (file)
@@ -367,7 +367,7 @@ megasas_free_cmds_fusion(struct megasas_instance *instance)
 static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)
 {
        int i;
-       u32 max_cmd;
+       u16 max_cmd;
        struct fusion_context *fusion;
        struct megasas_cmd_fusion *cmd;
 
@@ -1272,7 +1272,8 @@ megasas_init_adapter_fusion(struct megasas_instance *instance)
 {
        struct megasas_register_set __iomem *reg_set;
        struct fusion_context *fusion;
-       u32 max_cmd, scratch_pad_2;
+       u16 max_cmd;
+       u32 scratch_pad_2;
        int i = 0, count;
 
        fusion = instance->ctrl_context;