diff --git a/ibmvstgt/src/ibmvstgt.c b/ibmvstgt/src/ibmvstgt.c index 1d0604d35..698e240e8 100644 --- a/ibmvstgt/src/ibmvstgt.c +++ b/ibmvstgt/src/ibmvstgt.c @@ -671,26 +671,22 @@ static int process_tsk_mgmt(struct iu_entry *iue) break; case SRP_TSK_ABORT_TASK_SET: ret = scst_rx_mgmt_fn_lun(sess, SCST_ABORT_TASK_SET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, mgmt_ctx); break; case SRP_TSK_CLEAR_TASK_SET: ret = scst_rx_mgmt_fn_lun(sess, SCST_CLEAR_TASK_SET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, mgmt_ctx); break; case SRP_TSK_LUN_RESET: ret = scst_rx_mgmt_fn_lun(sess, SCST_LUN_RESET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, mgmt_ctx); break; case SRP_TSK_CLEAR_ACA: ret = scst_rx_mgmt_fn_lun(sess, SCST_CLEAR_ACA, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, mgmt_ctx); break; default: diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index b62bb06a3..8be4a0c34 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -422,7 +422,7 @@ static void close_conn(struct iscsi_conn *conn) /* Abort all outstanding commands */ rc = scst_rx_mgmt_fn_lun(session->scst_sess, - SCST_ABORT_ALL_TASKS_SESS, (uint8_t *)&lun, sizeof(lun), + SCST_ABORT_ALL_TASKS_SESS, &lun, sizeof(lun), SCST_NON_ATOMIC, conn); if (rc != 0) PRINT_ERROR("SCST_ABORT_ALL_TASKS_SESS failed %d", rc); @@ -431,7 +431,7 @@ static void close_conn(struct iscsi_conn *conn) int lun = 0; rc = scst_rx_mgmt_fn_lun(session->scst_sess, - SCST_NEXUS_LOSS_SESS, (uint8_t *)&lun, sizeof(lun), + SCST_NEXUS_LOSS_SESS, &lun, sizeof(lun), SCST_NON_ATOMIC, conn); if (rc != 0) PRINT_ERROR("SCST_NEXUS_LOSS_SESS failed %d", rc); diff --git a/mpt/mpt_scst.c b/mpt/mpt_scst.c index a07a38792..0e5e33db9 100644 --- a/mpt/mpt_scst.c +++ b/mpt/mpt_scst.c @@ -1916,35 +1916,30 @@ mpt_handle_task_mgmt(MPT_STM_PRIV *priv, u32 reply_word, case IMM_NTFY_CLEAR_ACA: TRACE(TRACE_MGMT, "%s", "IMM_NTFY_CLEAR_ACA received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_CLEAR_ACA, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, mcmd); + &lun, sizeof(lun), SCST_ATOMIC, mcmd); break; case IMM_NTFY_TARGET_RESET: TRACE(TRACE_MGMT, "%s", "IMM_NTFY_TARGET_RESET received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_TARGET_RESET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, mcmd); + &lun, sizeof(lun), SCST_ATOMIC, mcmd); break; case IMM_NTFY_LUN_RESET1: case IMM_NTFY_LUN_RESET2: TRACE(TRACE_MGMT, "%s", "IMM_NTFY_LUN_RESET received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_LUN_RESET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, mcmd); + &lun, sizeof(lun), SCST_ATOMIC, mcmd); break; case IMM_NTFY_CLEAR_TS: TRACE(TRACE_MGMT, "%s", "IMM_NTFY_CLEAR_TS received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_CLEAR_TASK_SET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, mcmd); + &lun, sizeof(lun), SCST_ATOMIC, mcmd); break; case IMM_NTFY_ABORT_TS1: case IMM_NTFY_ABORT_TS2: TRACE(TRACE_MGMT, "%s", "IMM_NTFY_ABORT_TS received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_ABORT_TASK_SET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, mcmd); + &lun, sizeof(lun), SCST_ATOMIC, mcmd); break; default: diff --git a/mvsas_tgt/mv_tgt.c b/mvsas_tgt/mv_tgt.c index 051c2a368..68ac489cf 100644 --- a/mvsas_tgt/mv_tgt.c +++ b/mvsas_tgt/mv_tgt.c @@ -1682,29 +1682,25 @@ static int mvst_handle_task_mgmt(struct mvs_info *mvi, case TMF_CLEAR_ACA: TRACE(TRACE_MGMT, "%s", "TMF_CLEAR_ACA received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_CLEAR_ACA, - (uint8_t *)lun, sizeof(lun), - SCST_ATOMIC, cmd); + &lun, sizeof(lun), SCST_ATOMIC, cmd); break; case TMF_LU_RESET: TRACE(TRACE_MGMT, "%s", "TMF_LU_RESET received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_LUN_RESET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, cmd); + &lun, sizeof(lun), SCST_ATOMIC, cmd); break; case TMF_CLEAR_TASK_SET: TRACE(TRACE_MGMT, "%s", "TMF_CLEAR_TASK_SET received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_CLEAR_TASK_SET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, cmd); + &lun, sizeof(lun), SCST_ATOMIC, cmd); break; case TMF_ABORT_TASK_SET: TRACE(TRACE_MGMT, "%s", "TMF_ABORT_TASK_SET received"); rc = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_ABORT_TASK_SET, - (uint8_t *)&lun, sizeof(lun), - SCST_ATOMIC, cmd); + &lun, sizeof(lun), SCST_ATOMIC, cmd); break; case TMF_ABORT_TASK: diff --git a/scst/include/scst.h b/scst/include/scst.h index f666fe4ea..74535c3f1 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2877,7 +2877,7 @@ static inline int scst_rx_mgmt_fn_tag(struct scst_session *sess, int fn, * Obsolete in favor of scst_rx_mgmt_fn() */ static inline int scst_rx_mgmt_fn_lun(struct scst_session *sess, int fn, - const uint8_t *lun, int lun_len, int atomic, void *tgt_priv) + const void *lun, int lun_len, int atomic, void *tgt_priv) { struct scst_rx_mgmt_params params; diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index a195cb802..67946136e 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -551,7 +551,7 @@ static void scst_pr_abort_reg(struct scst_device *dev, packed_lun = scst_pack_lun(reg->tgt_dev->lun, sess->acg->addr_method); rc = scst_rx_mgmt_fn_lun(sess, SCST_PR_ABORT_ALL, - (uint8_t *)&packed_lun, sizeof(packed_lun), SCST_NON_ATOMIC, + &packed_lun, sizeof(packed_lun), SCST_NON_ATOMIC, pr_cmd); if (rc != 0) { /* diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 9bc46b759..8b05351dd 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -6483,7 +6483,7 @@ void scst_unregister_session(struct scst_session *sess, int wait, /* Abort all outstanding commands and clear reservation, if necessary */ lun = 0; rc = scst_rx_mgmt_fn_lun(sess, SCST_UNREG_SESS_TM, - (uint8_t *)&lun, sizeof(lun), SCST_ATOMIC, NULL); + &lun, sizeof(lun), SCST_ATOMIC, NULL); if (rc != 0) { PRINT_ERROR("SCST_UNREG_SESS_TM failed %d (sess %p)", rc, sess); diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 18fc0f1bb..37223319c 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -826,8 +826,7 @@ static int scst_local_device_reset(struct scsi_cmnd *SCpnt) lun = cpu_to_be16(SCpnt->device->lun); ret = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_LUN_RESET, - (const uint8_t *)&lun, sizeof(lun), false, - &dev_reset_completion); + &lun, sizeof(lun), false, &dev_reset_completion); /* Now wait for the completion ... */ wait_for_completion_interruptible(&dev_reset_completion); @@ -856,8 +855,7 @@ static int scst_local_target_reset(struct scsi_cmnd *SCpnt) lun = cpu_to_be16(SCpnt->device->lun); ret = scst_rx_mgmt_fn_lun(sess->scst_sess, SCST_TARGET_RESET, - (const uint8_t *)&lun, sizeof(lun), false, - &dev_reset_completion); + &lun, sizeof(lun), false, &dev_reset_completion); /* Now wait for the completion ... */ wait_for_completion_interruptible(&dev_reset_completion); diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index b4fb6a69f..8a9bdea44 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1746,41 +1746,32 @@ static u8 srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch, switch (srp_tsk->tsk_mgmt_func) { case SRP_TSK_ABORT_TASK: TRACE_DBG("Processing SRP_TSK_ABORT_TASK"); - ret = scst_rx_mgmt_fn_tag(ch->scst_sess, - SCST_ABORT_TASK, + ret = scst_rx_mgmt_fn_tag(ch->scst_sess, SCST_ABORT_TASK, srp_tsk->task_tag, SCST_ATOMIC, send_ioctx); break; case SRP_TSK_ABORT_TASK_SET: TRACE_DBG("Processing SRP_TSK_ABORT_TASK_SET"); - ret = scst_rx_mgmt_fn_lun(ch->scst_sess, - SCST_ABORT_TASK_SET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + ret = scst_rx_mgmt_fn_lun(ch->scst_sess, SCST_ABORT_TASK_SET, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, send_ioctx); break; case SRP_TSK_CLEAR_TASK_SET: TRACE_DBG("Processing SRP_TSK_CLEAR_TASK_SET"); - ret = scst_rx_mgmt_fn_lun(ch->scst_sess, - SCST_CLEAR_TASK_SET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + ret = scst_rx_mgmt_fn_lun(ch->scst_sess, SCST_CLEAR_TASK_SET, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, send_ioctx); break; case SRP_TSK_LUN_RESET: TRACE_DBG("Processing SRP_TSK_LUN_RESET"); - ret = scst_rx_mgmt_fn_lun(ch->scst_sess, - SCST_LUN_RESET, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + ret = scst_rx_mgmt_fn_lun(ch->scst_sess, SCST_LUN_RESET, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, send_ioctx); break; case SRP_TSK_CLEAR_ACA: TRACE_DBG("Processing SRP_TSK_CLEAR_ACA"); - ret = scst_rx_mgmt_fn_lun(ch->scst_sess, - SCST_CLEAR_ACA, - (u8 *) &srp_tsk->lun, - sizeof srp_tsk->lun, + ret = scst_rx_mgmt_fn_lun(ch->scst_sess, SCST_CLEAR_ACA, + &srp_tsk->lun, sizeof(srp_tsk->lun), SCST_ATOMIC, send_ioctx); break; default: