treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts

With all callbacks converted, and the timer callback prototype
switched over, the TIMER_FUNC_TYPE cast is no longer needed,
so remove it. Conversion was done with the following scripts:

    perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
        $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)

    perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
        $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)

The now unused macros are also dropped from include/linux/timer.h.

Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
Kees Cook 2017-10-23 09:40:42 +02:00
parent 919b250f85
commit 841b86f328
44 changed files with 84 additions and 87 deletions

View File

@ -481,7 +481,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
* Use timer struct to check if the given source is initialized * Use timer struct to check if the given source is initialized
* by wakeup_source_add. * by wakeup_source_add.
*/ */
return ws->timer.function != (TIMER_FUNC_TYPE)pm_wakeup_timer_fn; return ws->timer.function != pm_wakeup_timer_fn;
} }
/* /*

View File

@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d)
d->rttavg = RTTAVG_INIT; d->rttavg = RTTAVG_INIT;
d->rttdev = RTTDEV_INIT; d->rttdev = RTTDEV_INIT;
d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer; d->timer.function = rexmit_timer;
skb = skb_clone(skb, GFP_ATOMIC); skb = skb_clone(skb, GFP_ATOMIC);
if (skb) { if (skb) {

View File

@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks,
if (fs->timeout_pending) if (fs->timeout_pending)
del_timer(&fs->timeout); del_timer(&fs->timeout);
fs->timeout.expires = jiffies + nticks; fs->timeout.expires = jiffies + nticks;
fs->timeout.function = (TIMER_FUNC_TYPE)proc; fs->timeout.function = proc;
add_timer(&fs->timeout); add_timer(&fs->timeout);
fs->timeout_pending = 1; fs->timeout_pending = 1;
} }

View File

@ -3819,7 +3819,7 @@ void nes_port_ibevent(struct nes_vnic *nesvnic)
if (!nesvnic->event_timer.function) { if (!nesvnic->event_timer.function) {
ib_dispatch_event(&event); ib_dispatch_event(&event);
nesvnic->last_dispatched_event = event.event; nesvnic->last_dispatched_event = event.event;
nesvnic->event_timer.function = (TIMER_FUNC_TYPE)nes_handle_delayed_event; nesvnic->event_timer.function = nes_handle_delayed_event;
nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY;
add_timer(&nesvnic->event_timer); add_timer(&nesvnic->event_timer);
} else { } else {

View File

@ -2047,7 +2047,7 @@ static void devm_input_device_unregister(struct device *dev, void *res)
*/ */
void input_enable_softrepeat(struct input_dev *dev, int delay, int period) void input_enable_softrepeat(struct input_dev *dev, int delay, int period)
{ {
dev->timer.function = (TIMER_FUNC_TYPE)input_repeat_key; dev->timer.function = input_repeat_key;
dev->rep[REP_DELAY] = delay; dev->rep[REP_DELAY] = delay;
dev->rep[REP_PERIOD] = period; dev->rep[REP_PERIOD] = period;
} }

View File

@ -402,7 +402,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
sizeof(struct saa7146_buf), sizeof(struct saa7146_buf),
file, &dev->v4l2_lock); file, &dev->v4l2_lock);
vv->vbi_read_timeout.function = (TIMER_FUNC_TYPE)vbi_read_timeout; vv->vbi_read_timeout.function = vbi_read_timeout;
vv->vbi_read_timeout_file = file; vv->vbi_read_timeout_file = file;
/* initialize the brs */ /* initialize the brs */

View File

@ -254,7 +254,7 @@ tlan_set_timer(struct net_device *dev, u32 ticks, u32 type)
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
return; return;
} }
priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; priv->timer.function = tlan_timer;
if (!in_irq()) if (!in_irq())
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
@ -1425,7 +1425,7 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int)
tlan_dio_write8(dev->base_addr, tlan_dio_write8(dev->base_addr,
TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT);
if (priv->timer.function == NULL) { if (priv->timer.function == NULL) {
priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; priv->timer.function = tlan_timer;
priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY;
priv->timer_set_at = jiffies; priv->timer_set_at = jiffies;
priv->timer_type = TLAN_TIMER_ACTIVITY; priv->timer_type = TLAN_TIMER_ACTIVITY;
@ -1576,7 +1576,7 @@ drop_and_reuse:
tlan_dio_write8(dev->base_addr, tlan_dio_write8(dev->base_addr,
TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT);
if (priv->timer.function == NULL) { if (priv->timer.function == NULL) {
priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; priv->timer.function = tlan_timer;
priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY;
priv->timer_set_at = jiffies; priv->timer_set_at = jiffies;
priv->timer_type = TLAN_TIMER_ACTIVITY; priv->timer_type = TLAN_TIMER_ACTIVITY;

View File

@ -1005,7 +1005,7 @@ static void __scc_start_tx_timer(struct scc_channel *scc,
} else } else
if (when != TIMER_OFF) if (when != TIMER_OFF)
{ {
scc->tx_t.function = (TIMER_FUNC_TYPE)handler; scc->tx_t.function = handler;
scc->tx_t.expires = jiffies + (when*HZ)/100; scc->tx_t.expires = jiffies + (when*HZ)/100;
add_timer(&scc->tx_t); add_timer(&scc->tx_t);
} }
@ -1031,7 +1031,7 @@ static void scc_start_defer(struct scc_channel *scc)
if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF) if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF)
{ {
scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_busy; scc->tx_wdog.function = t_busy;
scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer; scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer;
add_timer(&scc->tx_wdog); add_timer(&scc->tx_wdog);
} }
@ -1047,7 +1047,7 @@ static void scc_start_maxkeyup(struct scc_channel *scc)
if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF) if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF)
{ {
scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_maxkeyup; scc->tx_wdog.function = t_maxkeyup;
scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup; scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup;
add_timer(&scc->tx_wdog); add_timer(&scc->tx_wdog);
} }
@ -1428,7 +1428,7 @@ scc_start_calibrate(struct scc_channel *scc, int duration, unsigned char pattern
del_timer(&scc->tx_wdog); del_timer(&scc->tx_wdog);
scc->tx_wdog.function = (TIMER_FUNC_TYPE)scc_stop_calibrate; scc->tx_wdog.function = scc_stop_calibrate;
scc->tx_wdog.expires = jiffies + HZ*duration; scc->tx_wdog.expires = jiffies + HZ*duration;
add_timer(&scc->tx_wdog); add_timer(&scc->tx_wdog);

View File

@ -554,7 +554,7 @@ qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
return -EFAULT; return -EFAULT;
} }
mac->scan_timeout.function = (TIMER_FUNC_TYPE)qtnf_scan_timeout; mac->scan_timeout.function = qtnf_scan_timeout;
mod_timer(&mac->scan_timeout, mod_timer(&mac->scan_timeout,
jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ);

View File

@ -569,7 +569,7 @@ static int dl_startup_params(struct net_device *dev)
local->card_status = CARD_DL_PARAM; local->card_status = CARD_DL_PARAM;
/* Start kernel timer to wait for dl startup to complete. */ /* Start kernel timer to wait for dl startup to complete. */
local->timer.expires = jiffies + HZ / 2; local->timer.expires = jiffies + HZ / 2;
local->timer.function = (TIMER_FUNC_TYPE)verify_dl_startup; local->timer.function = verify_dl_startup;
add_timer(&local->timer); add_timer(&local->timer);
dev_dbg(&link->dev, dev_dbg(&link->dev,
"ray_cs dl_startup_params started timer for verify_dl_startup\n"); "ray_cs dl_startup_params started timer for verify_dl_startup\n");
@ -1947,12 +1947,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
dev_dbg(&link->dev, dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" start failed\n", "ray_cs interrupt network \"%s\" start failed\n",
memtmp); memtmp);
local->timer.function = (TIMER_FUNC_TYPE)start_net; local->timer.function = start_net;
} else { } else {
dev_dbg(&link->dev, dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" join failed\n", "ray_cs interrupt network \"%s\" join failed\n",
memtmp); memtmp);
local->timer.function = (TIMER_FUNC_TYPE)join_net; local->timer.function = join_net;
} }
add_timer(&local->timer); add_timer(&local->timer);
} }
@ -2417,9 +2417,9 @@ static void authenticate(ray_dev_t *local)
del_timer(&local->timer); del_timer(&local->timer);
if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) {
local->timer.function = (TIMER_FUNC_TYPE)join_net; local->timer.function = join_net;
} else { } else {
local->timer.function = (TIMER_FUNC_TYPE)authenticate_timeout; local->timer.function = authenticate_timeout;
} }
local->timer.expires = jiffies + HZ * 2; local->timer.expires = jiffies + HZ * 2;
add_timer(&local->timer); add_timer(&local->timer);
@ -2502,7 +2502,7 @@ static void associate(ray_dev_t *local)
del_timer(&local->timer); del_timer(&local->timer);
local->timer.expires = jiffies + HZ * 2; local->timer.expires = jiffies + HZ * 2;
local->timer.function = (TIMER_FUNC_TYPE)join_net; local->timer.function = join_net;
add_timer(&local->timer); add_timer(&local->timer);
local->card_status = CARD_ASSOC_FAILED; local->card_status = CARD_ASSOC_FAILED;
return; return;

View File

@ -158,7 +158,7 @@ static inline void
__sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) __sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *))
{ {
del_timer(&sclp_request_timer); del_timer(&sclp_request_timer);
sclp_request_timer.function = (TIMER_FUNC_TYPE)cb; sclp_request_timer.function = cb;
sclp_request_timer.expires = jiffies + time; sclp_request_timer.expires = jiffies + time;
add_timer(&sclp_request_timer); add_timer(&sclp_request_timer);
} }
@ -566,7 +566,7 @@ sclp_sync_wait(void)
if (timer_pending(&sclp_request_timer) && if (timer_pending(&sclp_request_timer) &&
get_tod_clock_fast() > timeout && get_tod_clock_fast() > timeout &&
del_timer(&sclp_request_timer)) del_timer(&sclp_request_timer))
sclp_request_timer.function((TIMER_DATA_TYPE)&sclp_request_timer); sclp_request_timer.function(&sclp_request_timer);
cpu_relax(); cpu_relax();
} }
local_irq_disable(); local_irq_disable();

View File

@ -34,7 +34,7 @@ static void zfcp_fsf_request_timeout_handler(struct timer_list *t)
static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req,
unsigned long timeout) unsigned long timeout)
{ {
fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_fsf_request_timeout_handler; fsf_req->timer.function = zfcp_fsf_request_timeout_handler;
fsf_req->timer.expires = jiffies + timeout; fsf_req->timer.expires = jiffies + timeout;
add_timer(&fsf_req->timer); add_timer(&fsf_req->timer);
} }
@ -42,7 +42,7 @@ static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req,
static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req)
{ {
BUG_ON(!fsf_req->erp_action); BUG_ON(!fsf_req->erp_action);
fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_erp_timeout_handler; fsf_req->timer.function = zfcp_erp_timeout_handler;
fsf_req->timer.expires = jiffies + 30 * HZ; fsf_req->timer.expires = jiffies + 30 * HZ;
add_timer(&fsf_req->timer); add_timer(&fsf_req->timer);
} }

View File

@ -1175,7 +1175,7 @@ static void asd_start_scb_timers(struct list_head *list)
struct asd_ascb *ascb; struct asd_ascb *ascb;
list_for_each_entry(ascb, list, list) { list_for_each_entry(ascb, list, list) {
if (!ascb->uldd_timer) { if (!ascb->uldd_timer) {
ascb->timer.function = (TIMER_FUNC_TYPE)asd_ascb_timedout; ascb->timer.function = asd_ascb_timedout;
ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT;
add_timer(&ascb->timer); add_timer(&ascb->timer);
} }

View File

@ -42,7 +42,7 @@ static int asd_enqueue_internal(struct asd_ascb *ascb,
ascb->tasklet_complete = tasklet_complete; ascb->tasklet_complete = tasklet_complete;
ascb->uldd_timer = 1; ascb->uldd_timer = 1;
ascb->timer.function = (TIMER_FUNC_TYPE)timed_out; ascb->timer.function = timed_out;
ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT;
add_timer(&ascb->timer); add_timer(&ascb->timer);

View File

@ -5279,7 +5279,7 @@ static void beiscsi_hw_health_check(struct timer_list *t)
if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state)) if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state))
return; return;
/* modify this timer to check TPE */ /* modify this timer to check TPE */
phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_tpe_check; phba->hw_check.function = beiscsi_hw_tpe_check;
} }
mod_timer(&phba->hw_check, mod_timer(&phba->hw_check,
@ -5367,7 +5367,7 @@ static int beiscsi_enable_port(struct beiscsi_hba *phba)
* Timer function gets modified for TPE detection. * Timer function gets modified for TPE detection.
* Always reinit to do health check first. * Always reinit to do health check first.
*/ */
phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_health_check; phba->hw_check.function = beiscsi_hw_health_check;
mod_timer(&phba->hw_check, mod_timer(&phba->hw_check,
jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL)); jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL));
return 0; return 0;

View File

@ -586,8 +586,8 @@ static int do_act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
cxgbi_sock_get(csk); cxgbi_sock_get(csk);
spin_lock_bh(&csk->lock); spin_lock_bh(&csk->lock);
if (rpl->status == CPL_ERR_CONN_EXIST && if (rpl->status == CPL_ERR_CONN_EXIST &&
csk->retry_timer.function != (TIMER_FUNC_TYPE)act_open_retry_timer) { csk->retry_timer.function != act_open_retry_timer) {
csk->retry_timer.function = (TIMER_FUNC_TYPE)act_open_retry_timer; csk->retry_timer.function = act_open_retry_timer;
mod_timer(&csk->retry_timer, jiffies + HZ / 2); mod_timer(&csk->retry_timer, jiffies + HZ / 2);
} else } else
cxgbi_sock_fail_act_open(csk, cxgbi_sock_fail_act_open(csk,

View File

@ -963,8 +963,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb)
spin_lock_bh(&csk->lock); spin_lock_bh(&csk->lock);
if (status == CPL_ERR_CONN_EXIST && if (status == CPL_ERR_CONN_EXIST &&
csk->retry_timer.function != (TIMER_FUNC_TYPE)csk_act_open_retry_timer) { csk->retry_timer.function != csk_act_open_retry_timer) {
csk->retry_timer.function = (TIMER_FUNC_TYPE)csk_act_open_retry_timer; csk->retry_timer.function = csk_act_open_retry_timer;
mod_timer(&csk->retry_timer, jiffies + HZ / 2); mod_timer(&csk->retry_timer, jiffies + HZ / 2);
} else } else
cxgbi_sock_fail_act_open(csk, cxgbi_sock_fail_act_open(csk,

View File

@ -839,7 +839,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
} }
task->task_done = hisi_sas_task_done; task->task_done = hisi_sas_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; task->slow_task->timer.function = hisi_sas_tmf_timedout;
task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);
@ -1451,7 +1451,7 @@ hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,
task->dev = device; task->dev = device;
task->task_proto = device->tproto; task->task_proto = device->tproto;
task->task_done = hisi_sas_task_done; task->task_done = hisi_sas_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; task->slow_task->timer.function = hisi_sas_tmf_timedout;
task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110); task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110);
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);

View File

@ -1268,7 +1268,7 @@ static void link_timeout_enable_link(struct timer_list *t)
} }
} }
hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; hisi_hba->timer.function = link_timeout_disable_link;
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900));
} }
@ -1289,13 +1289,13 @@ static void link_timeout_disable_link(struct timer_list *t)
} }
} }
hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_enable_link; hisi_hba->timer.function = link_timeout_enable_link;
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100));
} }
static void set_link_timer_quirk(struct hisi_hba *hisi_hba) static void set_link_timer_quirk(struct hisi_hba *hisi_hba)
{ {
hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; hisi_hba->timer.function = link_timeout_disable_link;
hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000);
add_timer(&hisi_hba->timer); add_timer(&hisi_hba->timer);
} }

View File

@ -997,7 +997,7 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
ipr_cmd->done = done; ipr_cmd->done = done;
ipr_cmd->timer.expires = jiffies + timeout; ipr_cmd->timer.expires = jiffies + timeout;
ipr_cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; ipr_cmd->timer.function = timeout_func;
add_timer(&ipr_cmd->timer); add_timer(&ipr_cmd->timer);
@ -8312,7 +8312,7 @@ static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd,
ipr_cmd->done = ipr_reset_ioa_job; ipr_cmd->done = ipr_reset_ioa_job;
ipr_cmd->timer.expires = jiffies + timeout; ipr_cmd->timer.expires = jiffies + timeout;
ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_reset_timer_done; ipr_cmd->timer.function = ipr_reset_timer_done;
add_timer(&ipr_cmd->timer); add_timer(&ipr_cmd->timer);
} }
@ -8397,7 +8397,7 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd)
} }
ipr_cmd->timer.expires = jiffies + stage_time * HZ; ipr_cmd->timer.expires = jiffies + stage_time * HZ;
ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; ipr_cmd->timer.function = ipr_oper_timeout;
ipr_cmd->done = ipr_reset_ioa_job; ipr_cmd->done = ipr_reset_ioa_job;
add_timer(&ipr_cmd->timer); add_timer(&ipr_cmd->timer);
@ -8468,7 +8468,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
} }
ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ);
ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; ipr_cmd->timer.function = ipr_oper_timeout;
ipr_cmd->done = ipr_reset_ioa_job; ipr_cmd->done = ipr_reset_ioa_job;
add_timer(&ipr_cmd->timer); add_timer(&ipr_cmd->timer);
list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q); list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);

View File

@ -1214,7 +1214,7 @@ static int fc_fcp_cmd_send(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
fsp->seq_ptr = seq; fsp->seq_ptr = seq;
fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */ fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */
fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; fsp->timer.function = fc_fcp_timeout;
if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED)
fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp));
@ -1307,7 +1307,7 @@ static void fc_lun_reset_send(struct timer_list *t)
return; return;
if (fc_fcp_lock_pkt(fsp)) if (fc_fcp_lock_pkt(fsp))
return; return;
fsp->timer.function = (TIMER_FUNC_TYPE)fc_lun_reset_send; fsp->timer.function = fc_lun_reset_send;
fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp));
fc_fcp_unlock_pkt(fsp); fc_fcp_unlock_pkt(fsp);
} }
@ -1445,7 +1445,7 @@ static void fc_fcp_timeout(struct timer_list *t)
if (fsp->lp->qfull) { if (fsp->lp->qfull) {
FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n", FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n",
fsp->timer_delay); fsp->timer_delay);
fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; fsp->timer.function = fc_fcp_timeout;
fc_fcp_timer_set(fsp, fsp->timer_delay); fc_fcp_timer_set(fsp, fsp->timer_delay);
goto unlock; goto unlock;
} }

View File

@ -92,7 +92,7 @@ static int smp_execute_task_sg(struct domain_device *dev,
task->task_done = smp_task_done; task->task_done = smp_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)smp_task_timedout; task->slow_task->timer.function = smp_task_timedout;
task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);

View File

@ -919,7 +919,7 @@ void sas_task_abort(struct sas_task *task)
return; return;
if (!del_timer(&slow->timer)) if (!del_timer(&slow->timer))
return; return;
slow->timer.function((TIMER_DATA_TYPE)&slow->timer); slow->timer.function(&slow->timer);
return; return;
} }

View File

@ -1310,7 +1310,7 @@ static int mvs_exec_internal_tmf_task(struct domain_device *dev,
memcpy(&task->ssp_task, parameter, para_len); memcpy(&task->ssp_task, parameter, para_len);
task->task_done = mvs_task_done; task->task_done = mvs_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)mvs_tmf_timedout; task->slow_task->timer.function = mvs_tmf_timedout;
task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);
@ -2020,7 +2020,7 @@ void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events)
MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no,
tmp | PHYEV_SIG_FIS); tmp | PHYEV_SIG_FIS);
if (phy->timer.function == NULL) { if (phy->timer.function == NULL) {
phy->timer.function = (TIMER_FUNC_TYPE)mvs_sig_time_out; phy->timer.function = mvs_sig_time_out;
phy->timer.expires = jiffies + 5*HZ; phy->timer.expires = jiffies + 5*HZ;
add_timer(&phy->timer); add_timer(&phy->timer);
} }

View File

@ -695,7 +695,7 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
task->task_proto = dev->tproto; task->task_proto = dev->tproto;
memcpy(&task->ssp_task, parameter, para_len); memcpy(&task->ssp_task, parameter, para_len);
task->task_done = pm8001_task_done; task->task_done = pm8001_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; task->slow_task->timer.function = pm8001_tmf_timedout;
task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ; task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);
@ -781,7 +781,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha,
task->dev = dev; task->dev = dev;
task->task_proto = dev->tproto; task->task_proto = dev->tproto;
task->task_done = pm8001_task_done; task->task_done = pm8001_task_done;
task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; task->slow_task->timer.function = pm8001_tmf_timedout;
task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ; task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ;
add_timer(&task->slow_task->timer); add_timer(&task->slow_task->timer);

View File

@ -604,7 +604,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_bist_done; cmd->timer.function = pmcraid_bist_done;
add_timer(&cmd->timer); add_timer(&cmd->timer);
} }
@ -636,7 +636,7 @@ static void pmcraid_reset_alert_done(struct timer_list *t)
/* restart timer if some more time is available to wait */ /* restart timer if some more time is available to wait */
cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT; cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT;
cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; cmd->timer.function = pmcraid_reset_alert_done;
add_timer(&cmd->timer); add_timer(&cmd->timer);
} }
} }
@ -673,7 +673,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
*/ */
cmd->time_left = PMCRAID_RESET_TIMEOUT; cmd->time_left = PMCRAID_RESET_TIMEOUT;
cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; cmd->timer.function = pmcraid_reset_alert_done;
add_timer(&cmd->timer); add_timer(&cmd->timer);
iowrite32(DOORBELL_IOA_RESET_ALERT, iowrite32(DOORBELL_IOA_RESET_ALERT,
@ -923,7 +923,7 @@ static void pmcraid_send_cmd(
if (timeout_func) { if (timeout_func) {
/* setup timeout handler */ /* setup timeout handler */
cmd->timer.expires = jiffies + timeout; cmd->timer.expires = jiffies + timeout;
cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; cmd->timer.function = timeout_func;
add_timer(&cmd->timer); add_timer(&cmd->timer);
} }
@ -1951,7 +1951,7 @@ static void pmcraid_soft_reset(struct pmcraid_cmd *cmd)
cmd->cmd_done = pmcraid_ioa_reset; cmd->cmd_done = pmcraid_ioa_reset;
cmd->timer.expires = jiffies + cmd->timer.expires = jiffies +
msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT); msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT);
cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_timeout_handler; cmd->timer.function = pmcraid_timeout_handler;
if (!timer_pending(&cmd->timer)) if (!timer_pending(&cmd->timer))
add_timer(&cmd->timer); add_timer(&cmd->timer);

View File

@ -75,7 +75,7 @@ struct lap_cb;
static inline void irda_start_timer(struct timer_list *ptimer, int timeout, static inline void irda_start_timer(struct timer_list *ptimer, int timeout,
void (*callback)(struct timer_list *)) void (*callback)(struct timer_list *))
{ {
ptimer->function = (TIMER_FUNC_TYPE) callback; ptimer->function = callback;
/* Set new value for timer (update or add timer). /* Set new value for timer (update or add timer).
* We use mod_timer() because it's more efficient and also * We use mod_timer() because it's more efficient and also

View File

@ -325,7 +325,7 @@ static int univ8250_setup_irq(struct uart_8250_port *up)
if (up->bugs & UART_BUG_THRE) { if (up->bugs & UART_BUG_THRE) {
pr_debug("ttyS%d - using backup timer\n", serial_index(port)); pr_debug("ttyS%d - using backup timer\n", serial_index(port));
up->timer.function = (TIMER_FUNC_TYPE)serial8250_backup_timeout; up->timer.function = serial8250_backup_timeout;
mod_timer(&up->timer, jiffies + mod_timer(&up->timer, jiffies +
uart_poll_timeout(port) + HZ / 5); uart_poll_timeout(port) + HZ / 5);
} }
@ -348,7 +348,7 @@ static void univ8250_release_irq(struct uart_8250_port *up)
struct uart_port *port = &up->port; struct uart_port *port = &up->port;
del_timer_sync(&up->timer); del_timer_sync(&up->timer);
up->timer.function = (TIMER_FUNC_TYPE)serial8250_timeout; up->timer.function = serial8250_timeout;
if (port->irq) if (port->irq)
serial_unlink_irq_chain(up); serial_unlink_irq_chain(up);
} }

View File

@ -118,7 +118,7 @@ struct kthread_delayed_work {
#define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \ #define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \
.work = KTHREAD_WORK_INIT((dwork).work, (fn)), \ .work = KTHREAD_WORK_INIT((dwork).work, (fn)), \
.timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\ .timer = __TIMER_INITIALIZER(kthread_delayed_work_timer_fn,\
TIMER_IRQSAFE), \ TIMER_IRQSAFE), \
} }

View File

@ -63,9 +63,6 @@ struct timer_list {
#define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) #define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE)
#define TIMER_DATA_TYPE struct timer_list *
#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE)
#define __TIMER_INITIALIZER(_function, _flags) { \ #define __TIMER_INITIALIZER(_function, _flags) { \
.entry = { .next = TIMER_ENTRY_STATIC }, \ .entry = { .next = TIMER_ENTRY_STATIC }, \
.function = (_function), \ .function = (_function), \
@ -76,7 +73,7 @@ struct timer_list {
#define DEFINE_TIMER(_name, _function) \ #define DEFINE_TIMER(_name, _function) \
struct timer_list _name = \ struct timer_list _name = \
__TIMER_INITIALIZER((TIMER_FUNC_TYPE)_function, 0) __TIMER_INITIALIZER(_function, 0)
/* /*
* LOCKDEP and DEBUG timer interfaces. * LOCKDEP and DEBUG timer interfaces.

View File

@ -176,7 +176,7 @@ struct execute_work {
#define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
.work = __WORK_INITIALIZER((n).work, (f)), \ .work = __WORK_INITIALIZER((n).work, (f)), \
.timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)delayed_work_timer_fn,\ .timer = __TIMER_INITIALIZER(delayed_work_timer_fn,\
(tflags) | TIMER_IRQSAFE), \ (tflags) | TIMER_IRQSAFE), \
} }

View File

@ -843,7 +843,7 @@ void __kthread_queue_delayed_work(struct kthread_worker *worker,
struct timer_list *timer = &dwork->timer; struct timer_list *timer = &dwork->timer;
struct kthread_work *work = &dwork->work; struct kthread_work *work = &dwork->work;
WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn); WARN_ON_ONCE(timer->function != kthread_delayed_work_timer_fn);
/* /*
* If @delay is 0, queue @dwork->work immediately. This is for * If @delay is 0, queue @dwork->work immediately. This is for

View File

@ -1509,7 +1509,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
struct work_struct *work = &dwork->work; struct work_struct *work = &dwork->work;
WARN_ON_ONCE(!wq); WARN_ON_ONCE(!wq);
WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)delayed_work_timer_fn); WARN_ON_ONCE(timer->function != delayed_work_timer_fn);
WARN_ON_ONCE(timer_pending(timer)); WARN_ON_ONCE(timer_pending(timer));
WARN_ON_ONCE(!list_empty(&work->entry)); WARN_ON_ONCE(!list_empty(&work->entry));

View File

@ -1798,7 +1798,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
else else
send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL); send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL);
entry->timer.expires = jiffies + (1 * HZ); entry->timer.expires = jiffies + (1 * HZ);
entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_arp; entry->timer.function = lec_arp_expire_arp;
add_timer(&entry->timer); add_timer(&entry->timer);
found = priv->mcast_vcc; found = priv->mcast_vcc;
} }
@ -1998,7 +1998,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
entry->old_recv_push = old_push; entry->old_recv_push = old_push;
entry->status = ESI_UNKNOWN; entry->status = ESI_UNKNOWN;
entry->timer.expires = jiffies + priv->vcc_timeout_period; entry->timer.expires = jiffies + priv->vcc_timeout_period;
entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; entry->timer.function = lec_arp_expire_vcc;
hlist_add_head(&entry->next, &priv->lec_no_forward); hlist_add_head(&entry->next, &priv->lec_no_forward);
add_timer(&entry->timer); add_timer(&entry->timer);
dump_arp_table(priv); dump_arp_table(priv);
@ -2082,7 +2082,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
entry->status = ESI_UNKNOWN; entry->status = ESI_UNKNOWN;
hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); hlist_add_head(&entry->next, &priv->lec_arp_empty_ones);
entry->timer.expires = jiffies + priv->vcc_timeout_period; entry->timer.expires = jiffies + priv->vcc_timeout_period;
entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; entry->timer.function = lec_arp_expire_vcc;
add_timer(&entry->timer); add_timer(&entry->timer);
pr_debug("After vcc was added\n"); pr_debug("After vcc was added\n");
dump_arp_table(priv); dump_arp_table(priv);

View File

@ -221,7 +221,7 @@ static int can_stats_proc_show(struct seq_file *m, void *v)
seq_putc(m, '\n'); seq_putc(m, '\n');
if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { if (net->can.can_stattimer.function == can_stat_update) {
seq_printf(m, " %8ld %% total match ratio (RXMR)\n", seq_printf(m, " %8ld %% total match ratio (RXMR)\n",
can_stats->total_rx_match_ratio); can_stats->total_rx_match_ratio);
@ -291,7 +291,7 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v)
user_reset = 1; user_reset = 1;
if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { if (net->can.can_stattimer.function == can_stat_update) {
seq_printf(m, "Scheduled statistic reset #%ld.\n", seq_printf(m, "Scheduled statistic reset #%ld.\n",
can_pstats->stats_reset + 1); can_pstats->stats_reset + 1);
} else { } else {

View File

@ -42,7 +42,7 @@ void lapb_start_t1timer(struct lapb_cb *lapb)
{ {
del_timer(&lapb->t1timer); del_timer(&lapb->t1timer);
lapb->t1timer.function = (TIMER_FUNC_TYPE)lapb_t1timer_expiry; lapb->t1timer.function = lapb_t1timer_expiry;
lapb->t1timer.expires = jiffies + lapb->t1; lapb->t1timer.expires = jiffies + lapb->t1;
add_timer(&lapb->t1timer); add_timer(&lapb->t1timer);
@ -52,7 +52,7 @@ void lapb_start_t2timer(struct lapb_cb *lapb)
{ {
del_timer(&lapb->t2timer); del_timer(&lapb->t2timer);
lapb->t2timer.function = (TIMER_FUNC_TYPE)lapb_t2timer_expiry; lapb->t2timer.function = lapb_t2timer_expiry;
lapb->t2timer.expires = jiffies + lapb->t2; lapb->t2timer.expires = jiffies + lapb->t2;
add_timer(&lapb->t2timer); add_timer(&lapb->t2timer);

View File

@ -284,7 +284,7 @@ void nr_destroy_socket(struct sock *sk)
if (sk_has_allocations(sk)) { if (sk_has_allocations(sk)) {
/* Defer: outstanding buffers */ /* Defer: outstanding buffers */
sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_destroy_timer; sk->sk_timer.function = nr_destroy_timer;
sk->sk_timer.expires = jiffies + 2 * HZ; sk->sk_timer.expires = jiffies + 2 * HZ;
add_timer(&sk->sk_timer); add_timer(&sk->sk_timer);
} else } else

View File

@ -45,7 +45,7 @@ void nr_init_timers(struct sock *sk)
timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); timer_setup(&nr->idletimer, nr_idletimer_expiry, 0);
/* initialized by sock_init_data */ /* initialized by sock_init_data */
sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_heartbeat_expiry; sk->sk_timer.function = nr_heartbeat_expiry;
} }
void nr_start_t1timer(struct sock *sk) void nr_start_t1timer(struct sock *sk)

View File

@ -37,7 +37,7 @@ void rose_start_ftimer(struct rose_neigh *neigh)
{ {
del_timer(&neigh->ftimer); del_timer(&neigh->ftimer);
neigh->ftimer.function = (TIMER_FUNC_TYPE)rose_ftimer_expiry; neigh->ftimer.function = rose_ftimer_expiry;
neigh->ftimer.expires = neigh->ftimer.expires =
jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout);
@ -48,7 +48,7 @@ static void rose_start_t0timer(struct rose_neigh *neigh)
{ {
del_timer(&neigh->t0timer); del_timer(&neigh->t0timer);
neigh->t0timer.function = (TIMER_FUNC_TYPE)rose_t0timer_expiry; neigh->t0timer.function = rose_t0timer_expiry;
neigh->t0timer.expires = neigh->t0timer.expires =
jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout);

View File

@ -36,7 +36,7 @@ void rose_start_heartbeat(struct sock *sk)
{ {
del_timer(&sk->sk_timer); del_timer(&sk->sk_timer);
sk->sk_timer.function = (TIMER_FUNC_TYPE)rose_heartbeat_expiry; sk->sk_timer.function = rose_heartbeat_expiry;
sk->sk_timer.expires = jiffies + 5 * HZ; sk->sk_timer.expires = jiffies + 5 * HZ;
add_timer(&sk->sk_timer); add_timer(&sk->sk_timer);
@ -48,7 +48,7 @@ void rose_start_t1timer(struct sock *sk)
del_timer(&rose->timer); del_timer(&rose->timer);
rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; rose->timer.function = rose_timer_expiry;
rose->timer.expires = jiffies + rose->t1; rose->timer.expires = jiffies + rose->t1;
add_timer(&rose->timer); add_timer(&rose->timer);
@ -60,7 +60,7 @@ void rose_start_t2timer(struct sock *sk)
del_timer(&rose->timer); del_timer(&rose->timer);
rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; rose->timer.function = rose_timer_expiry;
rose->timer.expires = jiffies + rose->t2; rose->timer.expires = jiffies + rose->t2;
add_timer(&rose->timer); add_timer(&rose->timer);
@ -72,7 +72,7 @@ void rose_start_t3timer(struct sock *sk)
del_timer(&rose->timer); del_timer(&rose->timer);
rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; rose->timer.function = rose_timer_expiry;
rose->timer.expires = jiffies + rose->t3; rose->timer.expires = jiffies + rose->t3;
add_timer(&rose->timer); add_timer(&rose->timer);
@ -84,7 +84,7 @@ void rose_start_hbtimer(struct sock *sk)
del_timer(&rose->timer); del_timer(&rose->timer);
rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; rose->timer.function = rose_timer_expiry;
rose->timer.expires = jiffies + rose->hb; rose->timer.expires = jiffies + rose->hb;
add_timer(&rose->timer); add_timer(&rose->timer);
@ -97,7 +97,7 @@ void rose_start_idletimer(struct sock *sk)
del_timer(&rose->idletimer); del_timer(&rose->idletimer);
if (rose->idle > 0) { if (rose->idle > 0) {
rose->idletimer.function = (TIMER_FUNC_TYPE)rose_idletimer_expiry; rose->idletimer.function = rose_idletimer_expiry;
rose->idletimer.expires = jiffies + rose->idle; rose->idletimer.expires = jiffies + rose->idle;
add_timer(&rose->idletimer); add_timer(&rose->idletimer);

View File

@ -745,7 +745,7 @@ static void svc_add_new_temp_xprt(struct svc_serv *serv, struct svc_xprt *newxpt
serv->sv_tmpcnt++; serv->sv_tmpcnt++;
if (serv->sv_temptimer.function == NULL) { if (serv->sv_temptimer.function == NULL) {
/* setup timer to age temp transports */ /* setup timer to age temp transports */
serv->sv_temptimer.function = (TIMER_FUNC_TYPE)svc_age_temp_xprts; serv->sv_temptimer.function = svc_age_temp_xprts;
mod_timer(&serv->sv_temptimer, mod_timer(&serv->sv_temptimer,
jiffies + svc_conn_age_period * HZ); jiffies + svc_conn_age_period * HZ);
} }

View File

@ -415,7 +415,7 @@ static void __x25_destroy_socket(struct sock *sk)
if (sk_has_allocations(sk)) { if (sk_has_allocations(sk)) {
/* Defer: outstanding buffers */ /* Defer: outstanding buffers */
sk->sk_timer.expires = jiffies + 10 * HZ; sk->sk_timer.expires = jiffies + 10 * HZ;
sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_destroy_timer; sk->sk_timer.function = x25_destroy_timer;
add_timer(&sk->sk_timer); add_timer(&sk->sk_timer);
} else { } else {
/* drop last reference so sock_put will free */ /* drop last reference so sock_put will free */

View File

@ -36,7 +36,7 @@ void x25_init_timers(struct sock *sk)
timer_setup(&x25->timer, x25_timer_expiry, 0); timer_setup(&x25->timer, x25_timer_expiry, 0);
/* initialized by sock_init_data */ /* initialized by sock_init_data */
sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_heartbeat_expiry; sk->sk_timer.function = x25_heartbeat_expiry;
} }
void x25_start_heartbeat(struct sock *sk) void x25_start_heartbeat(struct sock *sk)

View File

@ -201,7 +201,7 @@ static int line6_send_raw_message_async_part(struct message *msg,
void line6_start_timer(struct timer_list *timer, unsigned long msecs, void line6_start_timer(struct timer_list *timer, unsigned long msecs,
void (*function)(struct timer_list *t)) void (*function)(struct timer_list *t))
{ {
timer->function = (TIMER_FUNC_TYPE)function; timer->function = function;
mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); mod_timer(timer, jiffies + msecs_to_jiffies(msecs));
} }
EXPORT_SYMBOL_GPL(line6_start_timer); EXPORT_SYMBOL_GPL(line6_start_timer);