scsi: Remove unneeded break statements

A break is not needed if it is preceded by a return or goto.

Link: https://lore.kernel.org/r/20201019142333.16584-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Tom Rix 2020-10-19 07:23:33 -07:00 коммит произвёл Martin K. Petersen
Родитель 434ee42519
Коммит 170b7d2de2
17 изменённых файлов: 4 добавлений и 31 удалений

Просмотреть файл

@ -269,7 +269,6 @@ Again:
case TA_I_T_NEXUS_LOSS: case TA_I_T_NEXUS_LOSS:
opcode = dl->status_block[0]; opcode = dl->status_block[0];
goto Again; goto Again;
break;
case TF_INV_CONN_HANDLE: case TF_INV_CONN_HANDLE:
ts->resp = SAS_TASK_UNDELIVERED; ts->resp = SAS_TASK_UNDELIVERED;
ts->stat = SAS_DEVICE_UNKNOWN; ts->stat = SAS_DEVICE_UNKNOWN;

Просмотреть файл

@ -1244,18 +1244,14 @@ beiscsi_adap_family_disp(struct device *dev, struct device_attribute *attr,
case OC_DEVICE_ID2: case OC_DEVICE_ID2:
return snprintf(buf, PAGE_SIZE, return snprintf(buf, PAGE_SIZE,
"Obsolete/Unsupported BE2 Adapter Family\n"); "Obsolete/Unsupported BE2 Adapter Family\n");
break;
case BE_DEVICE_ID2: case BE_DEVICE_ID2:
case OC_DEVICE_ID3: case OC_DEVICE_ID3:
return snprintf(buf, PAGE_SIZE, "BE3-R Adapter Family\n"); return snprintf(buf, PAGE_SIZE, "BE3-R Adapter Family\n");
break;
case OC_SKH_ID1: case OC_SKH_ID1:
return snprintf(buf, PAGE_SIZE, "Skyhawk-R Adapter Family\n"); return snprintf(buf, PAGE_SIZE, "Skyhawk-R Adapter Family\n");
break;
default: default:
return snprintf(buf, PAGE_SIZE, return snprintf(buf, PAGE_SIZE,
"Unknown Adapter Family: 0x%x\n", dev_id); "Unknown Adapter Family: 0x%x\n", dev_id);
break;
} }
} }

Просмотреть файл

@ -770,7 +770,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
} else } else
printk(KERN_ERR PFX "SRR in progress\n"); printk(KERN_ERR PFX "SRR in progress\n");
goto ret_err_rqe; goto ret_err_rqe;
break;
default: default:
break; break;
} }

Просмотреть файл

@ -1894,7 +1894,6 @@ static int fcoe_device_notification(struct notifier_block *notifier,
mutex_unlock(&fcoe_config_mutex); mutex_unlock(&fcoe_config_mutex);
fcoe_ctlr_device_delete(fcoe_ctlr_to_ctlr_dev(ctlr)); fcoe_ctlr_device_delete(fcoe_ctlr_to_ctlr_dev(ctlr));
goto out; goto out;
break;
case NETDEV_FEAT_CHANGE: case NETDEV_FEAT_CHANGE:
fcoe_netdev_features_change(lport, netdev); fcoe_netdev_features_change(lport, netdev);
break; break;

Просмотреть файл

@ -7442,7 +7442,6 @@ static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr)
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"base address is invalid\n"); "base address is invalid\n");
return -1; return -1;
break;
} }
} }
if (offset == pci_bar_addr - PCI_BASE_ADDRESS_0) if (offset == pci_bar_addr - PCI_BASE_ADDRESS_0)

Просмотреть файл

@ -758,7 +758,6 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
scp->result = SAM_STAT_CHECK_CONDITION; scp->result = SAM_STAT_CHECK_CONDITION;
memcpy(scp->sense_buffer, &req->sg_list, SCSI_SENSE_BUFFERSIZE); memcpy(scp->sense_buffer, &req->sg_list, SCSI_SENSE_BUFFERSIZE);
goto skip_resid; goto skip_resid;
break;
default: default:
scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16; scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16;

Просмотреть файл

@ -9487,7 +9487,6 @@ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
case pci_channel_io_perm_failure: case pci_channel_io_perm_failure:
ipr_pci_perm_failure(pdev); ipr_pci_perm_failure(pdev);
return PCI_ERS_RESULT_DISCONNECT; return PCI_ERS_RESULT_DISCONNECT;
break;
default: default:
break; break;
} }

Просмотреть файл

@ -753,7 +753,6 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
default: default:
phy_event_warn(iphy, state, event_code); phy_event_warn(iphy, state, event_code);
return SCI_FAILURE; return SCI_FAILURE;
break;
} }
return SCI_SUCCESS; return SCI_SUCCESS;
case SCI_PHY_SUB_AWAIT_IAF_UF: case SCI_PHY_SUB_AWAIT_IAF_UF:
@ -958,7 +957,6 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
default: default:
phy_event_warn(iphy, state, event_code); phy_event_warn(iphy, state, event_code);
return SCI_FAILURE_INVALID_STATE; return SCI_FAILURE_INVALID_STATE;
break;
} }
return SCI_SUCCESS; return SCI_SUCCESS;
default: default:

Просмотреть файл

@ -3341,7 +3341,6 @@ lpfc_idiag_pcicfg_read(struct file *file, char __user *buf, size_t nbytes,
break; break;
case LPFC_PCI_CFG_BROWSE: /* browse all */ case LPFC_PCI_CFG_BROWSE: /* browse all */
goto pcicfg_browse; goto pcicfg_browse;
break;
default: default:
/* illegal count */ /* illegal count */
len = 0; len = 0;
@ -4381,7 +4380,7 @@ lpfc_idiag_queacc_write(struct file *file, const char __user *buf,
} }
} }
goto error_out; goto error_out;
break;
case LPFC_IDIAG_CQ: case LPFC_IDIAG_CQ:
/* MBX complete queue */ /* MBX complete queue */
if (phba->sli4_hba.mbx_cq && if (phba->sli4_hba.mbx_cq &&
@ -4433,7 +4432,7 @@ lpfc_idiag_queacc_write(struct file *file, const char __user *buf,
} }
} }
goto error_out; goto error_out;
break;
case LPFC_IDIAG_MQ: case LPFC_IDIAG_MQ:
/* MBX work queue */ /* MBX work queue */
if (phba->sli4_hba.mbx_wq && if (phba->sli4_hba.mbx_wq &&
@ -4447,7 +4446,7 @@ lpfc_idiag_queacc_write(struct file *file, const char __user *buf,
goto pass_check; goto pass_check;
} }
goto error_out; goto error_out;
break;
case LPFC_IDIAG_WQ: case LPFC_IDIAG_WQ:
/* ELS work queue */ /* ELS work queue */
if (phba->sli4_hba.els_wq && if (phba->sli4_hba.els_wq &&
@ -4487,9 +4486,8 @@ lpfc_idiag_queacc_write(struct file *file, const char __user *buf,
} }
} }
} }
goto error_out; goto error_out;
break;
case LPFC_IDIAG_RQ: case LPFC_IDIAG_RQ:
/* HDR queue */ /* HDR queue */
if (phba->sli4_hba.hdr_rq && if (phba->sli4_hba.hdr_rq &&
@ -4514,10 +4512,8 @@ lpfc_idiag_queacc_write(struct file *file, const char __user *buf,
goto pass_check; goto pass_check;
} }
goto error_out; goto error_out;
break;
default: default:
goto error_out; goto error_out;
break;
} }
pass_check: pass_check:

Просмотреть файл

@ -7196,7 +7196,6 @@ lpfc_init_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp)
"1431 Invalid HBA PCI-device group: 0x%x\n", "1431 Invalid HBA PCI-device group: 0x%x\n",
dev_grp); dev_grp);
return -ENODEV; return -ENODEV;
break;
} }
return 0; return 0;
} }

Просмотреть файл

@ -4284,7 +4284,6 @@ lpfc_scsi_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp)
"1418 Invalid HBA PCI-device group: 0x%x\n", "1418 Invalid HBA PCI-device group: 0x%x\n",
dev_grp); dev_grp);
return -ENODEV; return -ENODEV;
break;
} }
phba->lpfc_rampdown_queue_depth = lpfc_rampdown_queue_depth; phba->lpfc_rampdown_queue_depth = lpfc_rampdown_queue_depth;
phba->lpfc_scsi_cmd_iocb_cmpl = lpfc_scsi_cmd_iocb_cmpl; phba->lpfc_scsi_cmd_iocb_cmpl = lpfc_scsi_cmd_iocb_cmpl;

Просмотреть файл

@ -9189,7 +9189,6 @@ lpfc_mbox_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp)
"1420 Invalid HBA PCI-device group: 0x%x\n", "1420 Invalid HBA PCI-device group: 0x%x\n",
dev_grp); dev_grp);
return -ENODEV; return -ENODEV;
break;
} }
return 0; return 0;
} }
@ -10072,7 +10071,6 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
"2014 Invalid command 0x%x\n", "2014 Invalid command 0x%x\n",
iocbq->iocb.ulpCommand); iocbq->iocb.ulpCommand);
return IOCB_ERROR; return IOCB_ERROR;
break;
} }
if (iocbq->iocb_flag & LPFC_IO_DIF_PASS) if (iocbq->iocb_flag & LPFC_IO_DIF_PASS)
@ -10234,7 +10232,6 @@ lpfc_sli_api_table_setup(struct lpfc_hba *phba, uint8_t dev_grp)
"1419 Invalid HBA PCI-device group: 0x%x\n", "1419 Invalid HBA PCI-device group: 0x%x\n",
dev_grp); dev_grp);
return -ENODEV; return -ENODEV;
break;
} }
phba->lpfc_get_iocb_from_iocbq = lpfc_get_iocb_from_iocbq; phba->lpfc_get_iocb_from_iocbq = lpfc_get_iocb_from_iocbq;
return 0; return 0;

Просмотреть файл

@ -2296,7 +2296,6 @@ static int mvumi_cfg_hw_reg(struct mvumi_hba *mhba)
break; break;
default: default:
return -1; return -1;
break;
} }
return 0; return 0;

Просмотреть файл

@ -1102,8 +1102,6 @@ static irqreturn_t nspintr(int irq, void *dev_id)
nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN | AUTODIRECTION | ACKENB); nsp_index_write(base, SCSIBUSCTRL, SCSI_ATN | AUTODIRECTION | ACKENB);
return IRQ_HANDLED; return IRQ_HANDLED;
break;
case PH_RESELECT: case PH_RESELECT:
//nsp_dbg(NSP_DEBUG_INTR, "phase reselect"); //nsp_dbg(NSP_DEBUG_INTR, "phase reselect");
// *sync_neg = SYNC_NOT_YET; // *sync_neg = SYNC_NOT_YET;

Просмотреть файл

@ -4030,7 +4030,6 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags); set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags);
return; return;
break;
case TOPO_FL: case TOPO_FL:
ha->current_topology = ISP_CFG_FL; ha->current_topology = ISP_CFG_FL;
break; break;

Просмотреть файл

@ -2846,7 +2846,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
case MTNOP: case MTNOP:
DEBC_printk(STp, "No op on tape.\n"); DEBC_printk(STp, "No op on tape.\n");
return 0; /* Should do something ? */ return 0; /* Should do something ? */
break;
case MTRETEN: case MTRETEN:
cmd[0] = START_STOP; cmd[0] = START_STOP;
if (STp->immediate) { if (STp->immediate) {

Просмотреть файл

@ -4596,7 +4596,6 @@ static void sym_int_sir(struct sym_hcb *np)
scr_to_cpu(np->lastmsg), np->msgout[0]); scr_to_cpu(np->lastmsg), np->msgout[0]);
} }
goto out_clrack; goto out_clrack;
break;
default: default:
goto out_reject; goto out_reject;
} }