Commit dea98ba4 authored by YueHaibing's avatar YueHaibing Committed by Martin K. Petersen

scsi: megaraid_sas: remove set but not used variable 'cur_state'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_transition_to_ready:
drivers/scsi/megaraid/megaraid_sas_base.c:3900:6: warning: variable cur_state set but not used [-Wunused-but-set-variable]

Never used since commit 7218df69 ("[SCSI] megaraid_sas: use the
firmware boot timeout when waiting for commands")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarSumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f9e3ebee
...@@ -3909,7 +3909,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -3909,7 +3909,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
int i; int i;
u8 max_wait; u8 max_wait;
u32 fw_state; u32 fw_state;
u32 cur_state;
u32 abs_state, curr_abs_state; u32 abs_state, curr_abs_state;
abs_state = instance->instancet->read_fw_status_reg(instance); abs_state = instance->instancet->read_fw_status_reg(instance);
...@@ -3930,7 +3929,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -3930,7 +3929,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
abs_state & MFI_STATE_FAULT_SUBCODE, __func__); abs_state & MFI_STATE_FAULT_SUBCODE, __func__);
if (ocr) { if (ocr) {
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FAULT;
break; break;
} else { } else {
dev_printk(KERN_DEBUG, &instance->pdev->dev, "System Register set:\n"); dev_printk(KERN_DEBUG, &instance->pdev->dev, "System Register set:\n");
...@@ -3956,7 +3954,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -3956,7 +3954,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
&instance->reg_set->inbound_doorbell); &instance->reg_set->inbound_doorbell);
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_WAIT_HANDSHAKE;
break; break;
case MFI_STATE_BOOT_MESSAGE_PENDING: case MFI_STATE_BOOT_MESSAGE_PENDING:
...@@ -3972,7 +3969,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -3972,7 +3969,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
&instance->reg_set->inbound_doorbell); &instance->reg_set->inbound_doorbell);
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_BOOT_MESSAGE_PENDING;
break; break;
case MFI_STATE_OPERATIONAL: case MFI_STATE_OPERATIONAL:
...@@ -4005,7 +4001,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -4005,7 +4001,6 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
&instance->reg_set->inbound_doorbell); &instance->reg_set->inbound_doorbell);
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_OPERATIONAL;
break; break;
case MFI_STATE_UNDEFINED: case MFI_STATE_UNDEFINED:
...@@ -4013,32 +4008,26 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr) ...@@ -4013,32 +4008,26 @@ megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
* This state should not last for more than 2 seconds * This state should not last for more than 2 seconds
*/ */
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_UNDEFINED;
break; break;
case MFI_STATE_BB_INIT: case MFI_STATE_BB_INIT:
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_BB_INIT;
break; break;
case MFI_STATE_FW_INIT: case MFI_STATE_FW_INIT:
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FW_INIT;
break; break;
case MFI_STATE_FW_INIT_2: case MFI_STATE_FW_INIT_2:
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FW_INIT_2;
break; break;
case MFI_STATE_DEVICE_SCAN: case MFI_STATE_DEVICE_SCAN:
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_DEVICE_SCAN;
break; break;
case MFI_STATE_FLUSH_CACHE: case MFI_STATE_FLUSH_CACHE:
max_wait = MEGASAS_RESET_WAIT_TIME; max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FLUSH_CACHE;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment