scst_local: Remove superfluous casts (merge r4635 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4709 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-01-06 14:20:30 +00:00
parent 0dabf18259
commit 8e82ae9d53

View File

@@ -254,7 +254,7 @@ static int scst_local_get_initiator_port_transport_id(
goto out;
}
sess = (struct scst_local_sess *)scst_sess_get_tgt_priv(scst_sess);
sess = scst_sess_get_tgt_priv(scst_sess);
mutex_lock(&sess->tr_id_mutex);
@@ -535,7 +535,7 @@ static ssize_t scst_local_transport_id_show(struct kobject *kobj,
return -ENOENT;
scst_sess = container_of(kobj, struct scst_session, sess_kobj);
sess = (struct scst_local_sess *)scst_sess_get_tgt_priv(scst_sess);
sess = scst_sess_get_tgt_priv(scst_sess);
mutex_lock(&sess->tr_id_mutex);
@@ -572,7 +572,7 @@ static ssize_t scst_local_transport_id_store(struct kobject *kobj,
return -ENOENT;
scst_sess = container_of(kobj, struct scst_session, sess_kobj);
sess = (struct scst_local_sess *)scst_sess_get_tgt_priv(scst_sess);
sess = scst_sess_get_tgt_priv(scst_sess);
mutex_lock(&sess->tr_id_mutex);
@@ -1030,7 +1030,7 @@ static int scst_local_queuecommand_lck(struct scsi_cmnd *SCpnt,
*/
if (scsi_sglist(SCpnt)) {
sg_init_one(&(tgt_specific->sgl),
(void *)scsi_sglist(SCpnt),
scsi_sglist(SCpnt),
scsi_bufflen(SCpnt));
sgl = &(tgt_specific->sgl);
sgl_count = 1;
@@ -1191,7 +1191,7 @@ static void scst_aen_work_fn(struct work_struct *work)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
struct scst_local_sess *sess = (struct scst_local_sess *)ctx;
struct scst_local_sess *sess = ctx;
#else
struct scst_local_sess *sess =
container_of(work, struct scst_local_sess, aen_work);
@@ -1218,8 +1218,7 @@ static int scst_local_report_aen(struct scst_aen *aen)
TRACE_ENTRY();
sess = (struct scst_local_sess *)scst_sess_get_tgt_priv(
scst_aen_get_sess(aen));
sess = scst_sess_get_tgt_priv(scst_aen_get_sess(aen));
switch (event_fn) {
case SCST_AEN_SCSI:
/*
@@ -1363,7 +1362,7 @@ static void scst_local_targ_task_mgmt_done(struct scst_mgmt_cmd *mgmt_cmd)
TRACE_ENTRY();
compl = (struct completion *)scst_mgmt_cmd_get_tgt_priv(mgmt_cmd);
compl = scst_mgmt_cmd_get_tgt_priv(mgmt_cmd);
if (compl)
complete(compl);
@@ -1373,9 +1372,7 @@ static void scst_local_targ_task_mgmt_done(struct scst_mgmt_cmd *mgmt_cmd)
static uint16_t scst_local_get_scsi_transport_version(struct scst_tgt *scst_tgt)
{
struct scst_local_tgt *tgt;
tgt = (struct scst_local_tgt *)scst_tgt_get_tgt_priv(scst_tgt);
struct scst_local_tgt *tgt = scst_tgt_get_tgt_priv(scst_tgt);
if (tgt->scsi_transport_version == 0)
return 0x0BE0; /* SAS */
@@ -1385,9 +1382,7 @@ static uint16_t scst_local_get_scsi_transport_version(struct scst_tgt *scst_tgt)
static uint16_t scst_local_get_phys_transport_version(struct scst_tgt *scst_tgt)
{
struct scst_local_tgt *tgt;
tgt = (struct scst_local_tgt *)scst_tgt_get_tgt_priv(scst_tgt);
struct scst_local_tgt *tgt = scst_tgt_get_tgt_priv(scst_tgt);
return tgt->phys_transport_version;
}
@@ -1663,7 +1658,7 @@ static int __scst_local_add_adapter(struct scst_local_tgt *tgt,
INIT_LIST_HEAD(&sess->aen_work_list);
sess->scst_sess = scst_register_session(tgt->scst_tgt, 0,
initiator_name, (void *)sess, NULL, NULL);
initiator_name, sess, NULL, NULL);
if (sess->scst_sess == NULL) {
PRINT_ERROR("%s", "scst_register_session failed");
res = -EFAULT;