diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index c9456fad2..e1c97cb1b 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -3610,7 +3610,7 @@ static void iscsi_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd) case SCST_ABORT_ALL_TASKS_SESS: case SCST_ABORT_ALL_TASKS: case SCST_NEXUS_LOSS: - sBUG_ON(1); + sBUG(); break; default: iscsi_send_task_mgmt_resp(req, status, scst_mgmt_cmd_dropped(scst_mcmd)); diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index a3b2a127e..f8d005d15 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -368,7 +368,7 @@ void iscsi_task_mgmt_affected_cmds_done(struct scst_mgmt_cmd *scst_mcmd) case SCST_ABORT_ALL_TASKS_SESS: case SCST_ABORT_ALL_TASKS: case SCST_NEXUS_LOSS: - sBUG_ON(1); + sBUG(); break; default: /* Nothing to do */ diff --git a/mvsas_tgt/mv_init.c b/mvsas_tgt/mv_init.c index e5d78b8c6..4e381ba9d 100644 --- a/mvsas_tgt/mv_init.c +++ b/mvsas_tgt/mv_init.c @@ -193,7 +193,7 @@ static void mvs_tasklet(unsigned long opaque) mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[0]; if (unlikely(!mvi)) - BUG_ON(1); + BUG(); for (i = 0; i < core_nr; i++) { mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[i]; diff --git a/mvsas_tgt/mv_tgt.c b/mvsas_tgt/mv_tgt.c index f1d86de89..86c5a49fa 100644 --- a/mvsas_tgt/mv_tgt.c +++ b/mvsas_tgt/mv_tgt.c @@ -1224,7 +1224,7 @@ static void mvst_do_cmd_completion(struct mvs_info *mvi, TRACE_DBG("Read data command %p finished", cmd); if (err) { cmd->cmd_state = MVST_STATE_SEND_DATA_RETRY; - sBUG_ON(1); + sBUG(); } goto out; } else if (cmd->cmd_state == MVST_STATE_ABORTED) { diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index cb8e75056..3741f88fa 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -5606,7 +5606,7 @@ static void q2t_exec_sess_work(struct q2t_tgt *tgt, loop_id = GET_TARGET_ID(ha, &prm->tm_iocb); break; default: - sBUG_ON(1); + sBUG(); break; } @@ -5683,7 +5683,7 @@ send: break; } default: - sBUG_ON(1); + sBUG(); break; } @@ -5733,7 +5733,7 @@ out_term: 0, 0, 0, 0, 0); break; default: - sBUG_ON(1); + sBUG(); break; } goto out_put; diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index f8a7f28ac..a21d54355 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -109,10 +109,12 @@ #endif #ifdef CONFIG_SCST_EXTRACHECKS +#define EXTRACHECKS_BUG() sBUG() #define EXTRACHECKS_BUG_ON(a) sBUG_ON(a) #define EXTRACHECKS_WARN_ON(a) WARN_ON(a) #define EXTRACHECKS_WARN_ON_ONCE(a) WARN_ON_ONCE(a) #else +#define EXTRACHECKS_BUG() do { } while (0) #define EXTRACHECKS_BUG_ON(a) do { } while (0) #define EXTRACHECKS_WARN_ON(a) do { } while (0) #define EXTRACHECKS_WARN_ON_ONCE(a) do { } while (0) diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 4610f78e8..9f8d9e316 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -1910,7 +1910,7 @@ again: dev_user_unjam_cmd(u, 0, NULL); goto again; case UCMD_STATE_EXECING: - EXTRACHECKS_BUG_ON(1); + EXTRACHECKS_BUG(); } } } diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 397976b3e..64acf1b90 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -917,7 +917,7 @@ check: virt_dev->unmap_max_lba_cnt = q->limits.max_discard_sectors >> (block_shift - 9); virt_dev->discard_zeroes_data = q->limits.discard_zeroes_data; #else - sBUG_ON(1); + sBUG(); #endif } else { virt_dev->unmap_opt_gran = 1; @@ -1706,7 +1706,7 @@ static enum compl_status_e vdisk_exec_format_unit(struct vdisk_cmd_params *p) } break; default: - sBUG_ON(1); + sBUG(); break; } } @@ -3755,7 +3755,7 @@ static int vdisk_caching_pg(unsigned char *p, int pcontrol, p[2] |= (virt_dev->wt_flag_saved || virt_dev->nv_cache) ? 0 : WCE; break; default: - sBUG_ON(1); + sBUG(); break; } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6967c7e0e..4a8236f98 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -9561,7 +9561,7 @@ int scst_parse_descriptors(struct scst_cmd *cmd) res = scst_parse_unmap_descriptors(cmd); break; default: - sBUG_ON(1); + sBUG(); res = -1; break; } @@ -9579,7 +9579,7 @@ static void scst_free_descriptors(struct scst_cmd *cmd) scst_free_unmap_descriptors(cmd); break; default: - sBUG_ON(1); + sBUG(); break; } diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 33e2237f6..a490321d7 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2285,7 +2285,7 @@ static int scst_report_supported_opcodes(struct scst_cmd *cmd) } break; default: - sBUG_ON(1); + sBUG(); goto out_compl; }