diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 8b0ffb2f3..f0fb9b5cc 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -183,10 +183,10 @@ struct scst_cm_retry { scst_cm_retry_fn_t cm_retry_fn; }; -static void scst_cm_retry_work_fn(struct delayed_work *work) +static void scst_cm_retry_work_fn(struct work_struct *work) { struct scst_cm_retry *retry = container_of(work, struct scst_cm_retry, - cm_retry_work); + cm_retry_work.work); TRACE_ENTRY(); @@ -295,8 +295,7 @@ try_retry: } retry->cm_retry_cmd = cmd; __scst_cmd_get(cmd); - INIT_DELAYED_WORK(&retry->cm_retry_work, - (void (*)(struct work_struct *))scst_cm_retry_work_fn); + INIT_DELAYED_WORK(&retry->cm_retry_work, scst_cm_retry_work_fn); retry->cm_retry_fn = retry_fn; if (imm_retry) { @@ -1981,10 +1980,10 @@ out_unlock_free: goto out; } -void sess_cm_list_id_cleanup_work_fn(struct delayed_work *work) +void sess_cm_list_id_cleanup_work_fn(struct work_struct *work) { struct scst_session *sess = container_of(work, - struct scst_session, sess_cm_list_id_cleanup_work); + struct scst_session, sess_cm_list_id_cleanup_work.work); struct scst_cm_list_id *l, *t; unsigned long cur_time = jiffies; unsigned long flags; diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index 368f726c5..94a57d77e 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -88,10 +88,10 @@ out: return res; } -static void scst_event_timeout_fn(struct delayed_work *work) +static void scst_event_timeout_fn(struct work_struct *work) { struct scst_event_entry *event_entry = container_of(work, - struct scst_event_entry, event_timeout_work); + struct scst_event_entry, event_timeout_work.work); TRACE_ENTRY(); @@ -199,7 +199,7 @@ static void __scst_event_queue(struct scst_event_entry *event_entry) } INIT_DELAYED_WORK(&new_event_entry->event_timeout_work, - (void (*)(struct work_struct *))scst_event_timeout_fn); + scst_event_timeout_fn); if (new_event_entry->event_notify_fn != NULL) { new_event_entry->event.event_id = atomic_inc_return(&base_event_id); if (new_event_entry->event_timeout == 0) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index e87c90b39..6666f8907 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6715,7 +6715,7 @@ struct scst_session *scst_alloc_session(struct scst_tgt *tgt, gfp_t gfp_mask, INIT_LIST_HEAD(&sess->init_deferred_mcmd_list); INIT_LIST_HEAD(&sess->sess_cm_list_id_list); INIT_DELAYED_WORK(&sess->sess_cm_list_id_cleanup_work, - (void (*)(struct work_struct *))sess_cm_list_id_cleanup_work_fn); + sess_cm_list_id_cleanup_work_fn); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)) INIT_DELAYED_WORK(&sess->hw_pending_work, scst_hw_pending_work_fn); #else diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index 5d9234364..880a5a8cc 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -858,7 +858,7 @@ void scst_cm_free_descriptors(struct scst_cmd *cmd); int scst_cm_ext_copy_exec(struct scst_cmd *cmd); int scst_cm_rcv_copy_res_exec(struct scst_cmd *cmd); -void sess_cm_list_id_cleanup_work_fn(struct delayed_work *work); +void sess_cm_list_id_cleanup_work_fn(struct work_struct *work); void scst_cm_free_pending_list_ids(struct scst_session *sess); bool scst_cm_check_block_all_devs(struct scst_cmd *cmd); diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index 00f6b0d2e..fa92ed48c 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -400,10 +400,11 @@ struct scst_alua_retry { struct delayed_work alua_retry_work; }; -static void scst_alua_transitioning_work_fn(struct delayed_work *work) +static void scst_alua_transitioning_work_fn(struct work_struct *work) { - struct scst_alua_retry *retry = container_of(work, struct scst_alua_retry, - alua_retry_work); + struct scst_alua_retry *retry = + container_of(work, struct scst_alua_retry, + alua_retry_work.work); struct scst_cmd *cmd = retry->alua_retry_cmd; TRACE_ENTRY(); @@ -469,7 +470,7 @@ static int scst_tg_accept_transitioning(struct scst_cmd *cmd) /* No get is needed, because cmd is sync here */ retry->alua_retry_cmd = cmd; INIT_DELAYED_WORK(&retry->alua_retry_work, - (void (*)(struct work_struct *))scst_alua_transitioning_work_fn); + scst_alua_transitioning_work_fn); cmd->already_transitioning = 1; schedule_delayed_work(&retry->alua_retry_work, HZ/2); res = SCST_ALUA_CHECK_DELAYED;