mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
iscsi-scst: Remove superfluous casts
The C language does not require to use an explicit cast when assigning a void * pointer to a pointer of another type. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6633 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -584,7 +584,7 @@ static void conn_nop_in_delayed_work_fn(struct work_struct *work)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
struct iscsi_conn *conn = (struct iscsi_conn *)p;
|
||||
struct iscsi_conn *conn = p;
|
||||
#else
|
||||
struct iscsi_conn *conn = container_of(work, struct iscsi_conn,
|
||||
nop_in_delayed_work.work);
|
||||
|
||||
@@ -1745,8 +1745,7 @@ out:
|
||||
static int iscsi_pre_exec(struct scst_cmd *scst_cmd)
|
||||
{
|
||||
int res = SCST_PREPROCESS_STATUS_SUCCESS;
|
||||
struct iscsi_cmnd *req = (struct iscsi_cmnd *)
|
||||
scst_cmd_get_tgt_priv(scst_cmd);
|
||||
struct iscsi_cmnd *req = scst_cmd_get_tgt_priv(scst_cmd);
|
||||
struct iscsi_cmnd *c, *t;
|
||||
|
||||
TRACE_ENTRY();
|
||||
@@ -3376,8 +3375,7 @@ static void iscsi_tcp_preprocessing_done(struct iscsi_cmnd *req)
|
||||
|
||||
static void iscsi_preprocessing_done(struct scst_cmd *scst_cmd)
|
||||
{
|
||||
struct iscsi_cmnd *req = (struct iscsi_cmnd *)
|
||||
scst_cmd_get_tgt_priv(scst_cmd);
|
||||
struct iscsi_cmnd *req = scst_cmd_get_tgt_priv(scst_cmd);
|
||||
|
||||
req->conn->transport->iscsit_preprocessing_done(req);
|
||||
}
|
||||
@@ -3489,8 +3487,7 @@ static void iscsi_tcp_conn_close(struct iscsi_conn *conn, int flags)
|
||||
static int iscsi_xmit_response(struct scst_cmd *scst_cmd)
|
||||
{
|
||||
int is_send_status = scst_cmd_get_is_send_status(scst_cmd);
|
||||
struct iscsi_cmnd *req = (struct iscsi_cmnd *)
|
||||
scst_cmd_get_tgt_priv(scst_cmd);
|
||||
struct iscsi_cmnd *req = scst_cmd_get_tgt_priv(scst_cmd);
|
||||
struct iscsi_conn *conn = req->conn;
|
||||
int status = scst_cmd_get_status(scst_cmd);
|
||||
u8 *sense = scst_cmd_get_sense_buffer(scst_cmd);
|
||||
@@ -3769,8 +3766,7 @@ static inline int iscsi_get_mgmt_response(int status)
|
||||
static void iscsi_task_mgmt_fn_done(struct scst_mgmt_cmd *scst_mcmd)
|
||||
{
|
||||
int fn = scst_mgmt_cmd_get_fn(scst_mcmd);
|
||||
struct iscsi_cmnd *req = (struct iscsi_cmnd *)
|
||||
scst_mgmt_cmd_get_tgt_priv(scst_mcmd);
|
||||
struct iscsi_cmnd *req = scst_mgmt_cmd_get_tgt_priv(scst_mcmd);
|
||||
int status = iscsi_get_mgmt_response(scst_mgmt_cmd_get_status(scst_mcmd));
|
||||
|
||||
if ((status == ISCSI_RESPONSE_UNKNOWN_TASK) &&
|
||||
|
||||
@@ -334,7 +334,7 @@ void iscsi_task_mgmt_affected_cmds_done(struct scst_mgmt_cmd *scst_mcmd)
|
||||
switch (fn) {
|
||||
case SCST_NEXUS_LOSS_SESS:
|
||||
{
|
||||
struct iscsi_conn *conn = (struct iscsi_conn *)priv;
|
||||
struct iscsi_conn *conn = priv;
|
||||
struct iscsi_session *sess = conn->session;
|
||||
struct iscsi_conn *c;
|
||||
|
||||
@@ -584,7 +584,7 @@ static void close_conn(struct iscsi_conn *conn)
|
||||
|
||||
static int close_conn_thr(void *arg)
|
||||
{
|
||||
struct iscsi_conn *conn = (struct iscsi_conn *)arg;
|
||||
struct iscsi_conn *conn = arg;
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
@@ -1145,7 +1145,7 @@ static inline void __iscsi_get_page_callback(struct iscsi_cmnd *cmd)
|
||||
|
||||
void iscsi_get_page_callback(struct page *page)
|
||||
{
|
||||
struct iscsi_cmnd *cmd = (struct iscsi_cmnd *)page->net_priv;
|
||||
struct iscsi_cmnd *cmd = page->net_priv;
|
||||
|
||||
TRACE_NET_PAGE("page %p, _count %d", page,
|
||||
atomic_read(&page->_count));
|
||||
@@ -1176,7 +1176,7 @@ static inline void __iscsi_put_page_callback(struct iscsi_cmnd *cmd)
|
||||
|
||||
void iscsi_put_page_callback(struct page *page)
|
||||
{
|
||||
struct iscsi_cmnd *cmd = (struct iscsi_cmnd *)page->net_priv;
|
||||
struct iscsi_cmnd *cmd = page->net_priv;
|
||||
|
||||
TRACE_NET_PAGE("page %p, _count %d", page,
|
||||
atomic_read(&page->_count));
|
||||
|
||||
Reference in New Issue
Block a user