mirror of
https://github.com/SCST-project/scst.git
synced 2026-07-24 17:12:51 +00:00
Use the fallthrough macro instead of a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3375,7 +3375,7 @@ static void iscsi_try_local_processing(struct iscsi_cmnd *req)
|
||||
switch (conn->wr_state) {
|
||||
case ISCSI_CONN_WR_STATE_IN_LIST:
|
||||
list_del(&conn->wr_list_entry);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case ISCSI_CONN_WR_STATE_IDLE:
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
conn->wr_task = current;
|
||||
|
||||
@@ -703,7 +703,7 @@ static int process_read_io(struct iscsi_conn *conn, int *closed)
|
||||
iscsi_conn_init_read(cmnd->conn, &cmnd->pdu.bhs,
|
||||
sizeof(cmnd->pdu.bhs));
|
||||
conn->read_state = RX_BHS;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
case RX_BHS:
|
||||
res = do_recv(conn);
|
||||
@@ -818,7 +818,7 @@ static int process_read_io(struct iscsi_conn *conn, int *closed)
|
||||
case RX_INIT_HDIGEST:
|
||||
iscsi_conn_init_read(conn, &cmnd->hdigest, sizeof(u32));
|
||||
conn->read_state = RX_CHECK_HDIGEST;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
case RX_CHECK_HDIGEST:
|
||||
res = do_recv(conn);
|
||||
@@ -837,7 +837,7 @@ static int process_read_io(struct iscsi_conn *conn, int *closed)
|
||||
case RX_INIT_DDIGEST:
|
||||
iscsi_conn_init_read(conn, &cmnd->ddigest, sizeof(u32));
|
||||
conn->read_state = RX_CHECK_DDIGEST;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
case RX_CHECK_DDIGEST:
|
||||
res = iscsi_rx_check_ddigest(conn);
|
||||
@@ -1471,13 +1471,13 @@ int iscsi_send(struct iscsi_conn *conn)
|
||||
if (!(conn->hdigest_type & DIGEST_NONE))
|
||||
init_tx_hdigest(cmnd);
|
||||
conn->write_state = TX_BHS_DATA;
|
||||
/* fall-through */
|
||||
fallthrough;
|
||||
case TX_BHS_DATA:
|
||||
res = iscsi_do_send(conn, cmnd->pdu.datasize ?
|
||||
TX_INIT_PADDING : TX_END);
|
||||
if (res <= 0 || conn->write_state != TX_INIT_PADDING)
|
||||
break;
|
||||
/* fall-through */
|
||||
fallthrough;
|
||||
case TX_INIT_PADDING:
|
||||
cmnd->conn->write_size = ((cmnd->pdu.datasize + 3) & -4) -
|
||||
cmnd->pdu.datasize;
|
||||
@@ -1492,11 +1492,11 @@ int iscsi_send(struct iscsi_conn *conn)
|
||||
res = tx_padding(cmnd, ddigest ? TX_INIT_DDIGEST : TX_END);
|
||||
if (res <= 0 || conn->write_state != TX_INIT_DDIGEST)
|
||||
break;
|
||||
/* fall-through */
|
||||
fallthrough;
|
||||
case TX_INIT_DDIGEST:
|
||||
cmnd->conn->write_size = sizeof(u32);
|
||||
conn->write_state = TX_DDIGEST;
|
||||
/* fall-through */
|
||||
fallthrough;
|
||||
case TX_DDIGEST:
|
||||
res = tx_ddigest(cmnd, TX_END);
|
||||
break;
|
||||
|
||||
@@ -785,7 +785,7 @@ static int dev_user_parse(struct scst_cmd *cmd)
|
||||
res = SCST_CMD_STATE_NEED_THREAD_CTX;
|
||||
goto out;
|
||||
}
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
case SCST_USER_PARSE_CALL:
|
||||
TRACE_DBG("Preparing PARSE for user space (ucmd=%p, h=%d, "
|
||||
@@ -1289,7 +1289,7 @@ out:
|
||||
out_nomem:
|
||||
if (ucmd->cmd != NULL)
|
||||
scst_set_busy(ucmd->cmd);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
|
||||
out_err:
|
||||
if (ucmd->cmd != NULL)
|
||||
|
||||
+5
-5
@@ -3096,7 +3096,7 @@ int scst_get_cmd_abnormal_done_state(struct scst_cmd *cmd)
|
||||
break;
|
||||
}
|
||||
trace = true;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_CMD_STATE_DEV_DONE:
|
||||
if (cmd->internal)
|
||||
res = SCST_CMD_STATE_FINISHED_INTERNAL;
|
||||
@@ -3131,7 +3131,7 @@ int scst_get_cmd_abnormal_done_state(struct scst_cmd *cmd)
|
||||
res = SCST_CMD_STATE_PREPROCESSING_DONE;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_CMD_STATE_RDY_TO_XFER:
|
||||
case SCST_CMD_STATE_DATA_WAIT:
|
||||
case SCST_CMD_STATE_TGT_PRE_EXEC:
|
||||
@@ -9693,7 +9693,7 @@ static int scst_do_dif(struct scst_cmd *cmd,
|
||||
case SCST_DIF_CHECK_REF_TAG:
|
||||
default:
|
||||
EXTRACHECKS_BUG_ON(1);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_DIF_ACTION_NONE:
|
||||
/* Nothing to do */
|
||||
TRACE_DBG("NONE DIF action, skipping (cmd %p)", cmd);
|
||||
@@ -10945,7 +10945,7 @@ static int __scst_parse_vrprotect(struct scst_cmd *cmd, int vrprotect_offs)
|
||||
cmd->cmd_dif_actions = 0;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case 1:
|
||||
case 5:
|
||||
cmd->cmd_dif_actions = SCST_DIF_CHECK_GUARD_TAG |
|
||||
@@ -13922,7 +13922,7 @@ static void scst_process_qerr(struct scst_cmd *cmd)
|
||||
default:
|
||||
PRINT_WARNING("Invalid QErr value %x for device %s, process as "
|
||||
"0", qerr, dev->virt_name);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_QERR_0_ALL_RESUME:
|
||||
/* Nothing to do */
|
||||
break;
|
||||
|
||||
@@ -902,7 +902,7 @@ active:
|
||||
default:
|
||||
PRINT_ERROR("Context %x is undefined, using the thread one",
|
||||
pref_context);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_CONTEXT_THREAD:
|
||||
spin_lock_irqsave(&cmd->cmd_threads->cmd_list_lock, flags);
|
||||
TRACE_DBG("Adding cmd %p to active cmd list", cmd);
|
||||
@@ -1358,7 +1358,7 @@ set_res:
|
||||
TRACE_DBG_FLAG(TRACE_DEBUG|TRACE_MINOR, "Atomic context and "
|
||||
"non-WRITE data direction, rescheduling (cmd %p)", cmd);
|
||||
res = SCST_CMD_STATE_RES_NEED_THREAD;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1729,7 +1729,7 @@ void scst_restart_cmd(struct scst_cmd *cmd, int status,
|
||||
set_bit(SCST_CMD_ABORTED, &cmd->cmd_flags);
|
||||
set_bit(SCST_CMD_NO_RESP, &cmd->cmd_flags);
|
||||
cmd->delivery_status = SCST_CMD_DELIVERY_FAILED;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_PREPROCESS_STATUS_ERROR:
|
||||
if (cmd->sense != NULL)
|
||||
scst_set_cmd_error(cmd,
|
||||
@@ -1897,7 +1897,7 @@ static void scst_process_redirect_cmd(struct scst_cmd *cmd,
|
||||
default:
|
||||
PRINT_ERROR("Context %x is unknown, using the thread one",
|
||||
context);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_CONTEXT_THREAD:
|
||||
{
|
||||
struct list_head *active_cmd_list;
|
||||
@@ -1997,7 +1997,7 @@ void scst_rx_data(struct scst_cmd *cmd, int status,
|
||||
set_bit(SCST_CMD_ABORTED, &cmd->cmd_flags);
|
||||
set_bit(SCST_CMD_NO_RESP, &cmd->cmd_flags);
|
||||
cmd->delivery_status = SCST_CMD_DELIVERY_FAILED;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_RX_STATUS_ERROR:
|
||||
TRACE(TRACE_SCSI, "cmd %p, RX data error status %#x", cmd, status);
|
||||
if (!cmd->write_not_received_set)
|
||||
@@ -2129,7 +2129,7 @@ static int scst_tgt_pre_exec(struct scst_cmd *cmd)
|
||||
set_bit(SCST_CMD_ABORTED, &cmd->cmd_flags);
|
||||
set_bit(SCST_CMD_NO_RESP, &cmd->cmd_flags);
|
||||
cmd->delivery_status = SCST_CMD_DELIVERY_FAILED;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_PREPROCESS_STATUS_ERROR:
|
||||
scst_set_cmd_error(cmd,
|
||||
SCST_LOAD_SENSE(scst_sense_hardw_error));
|
||||
@@ -2995,7 +2995,7 @@ defer:
|
||||
case SCST_QERR_3_ABORT_THIS_NEXUS_ONLY:
|
||||
if (!this_nex)
|
||||
goto defer;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case SCST_QERR_1_ABORT_ALL:
|
||||
TRACE_MGMT_DBG("Aborting cmd %p due to "
|
||||
"ACA active (tgt_dev %p)", cmd,
|
||||
|
||||
+1
-1
@@ -2003,7 +2003,7 @@ int scst_tg_set_group_info(struct scst_cmd *cmd)
|
||||
break;
|
||||
default:
|
||||
WARN_ONCE(true, "res = %d\n", res);
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
case -EOVERFLOW:
|
||||
scst_set_cmd_error(cmd,
|
||||
SCST_LOAD_SENSE(scst_sense_set_target_pgs_failed));
|
||||
|
||||
+1
-1
@@ -3792,7 +3792,7 @@ static int srpt_xmit_response(struct scst_cmd *cmd)
|
||||
WARN_ONCE(true,
|
||||
"srpt_xfer_data() returned %d\n",
|
||||
ret);
|
||||
/* fall-through */
|
||||
fallthrough;
|
||||
case -EIO:
|
||||
ret = SCST_TGT_RES_FATAL_ERROR;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user