diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-23 03:40:42 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-21 19:35:54 -0500 |
commit | 841b86f3289dbe858daeceec36423d4ea286fac2 (patch) | |
tree | 332a53d6045914798e364a534fe3a47cab56d803 | |
parent | 919b250f8570618e84af544c3e18dad5210eb9b6 (diff) |
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>
44 files changed, 84 insertions, 87 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 680ee1d36ac9..38559f04db2c 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
@@ -481,7 +481,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws) | |||
481 | * Use timer struct to check if the given source is initialized | 481 | * Use timer struct to check if the given source is initialized |
482 | * by wakeup_source_add. | 482 | * by wakeup_source_add. |
483 | */ | 483 | */ |
484 | return ws->timer.function != (TIMER_FUNC_TYPE)pm_wakeup_timer_fn; | 484 | return ws->timer.function != pm_wakeup_timer_fn; |
485 | } | 485 | } |
486 | 486 | ||
487 | /* | 487 | /* |
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 55ab25f79a08..812fed069708 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d) | |||
1429 | 1429 | ||
1430 | d->rttavg = RTTAVG_INIT; | 1430 | d->rttavg = RTTAVG_INIT; |
1431 | d->rttdev = RTTDEV_INIT; | 1431 | d->rttdev = RTTDEV_INIT; |
1432 | d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer; | 1432 | d->timer.function = rexmit_timer; |
1433 | 1433 | ||
1434 | skb = skb_clone(skb, GFP_ATOMIC); | 1434 | skb = skb_clone(skb, GFP_ATOMIC); |
1435 | if (skb) { | 1435 | if (skb) { |
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index e620e423102b..af51015d056e 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
@@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks, | |||
397 | if (fs->timeout_pending) | 397 | if (fs->timeout_pending) |
398 | del_timer(&fs->timeout); | 398 | del_timer(&fs->timeout); |
399 | fs->timeout.expires = jiffies + nticks; | 399 | fs->timeout.expires = jiffies + nticks; |
400 | fs->timeout.function = (TIMER_FUNC_TYPE)proc; | 400 | fs->timeout.function = proc; |
401 | add_timer(&fs->timeout); | 401 | add_timer(&fs->timeout); |
402 | fs->timeout_pending = 1; | 402 | fs->timeout_pending = 1; |
403 | } | 403 | } |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index db46b7b53fb4..162475aeeedd 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -3819,7 +3819,7 @@ void nes_port_ibevent(struct nes_vnic *nesvnic) | |||
3819 | if (!nesvnic->event_timer.function) { | 3819 | if (!nesvnic->event_timer.function) { |
3820 | ib_dispatch_event(&event); | 3820 | ib_dispatch_event(&event); |
3821 | nesvnic->last_dispatched_event = event.event; | 3821 | nesvnic->last_dispatched_event = event.event; |
3822 | nesvnic->event_timer.function = (TIMER_FUNC_TYPE)nes_handle_delayed_event; | 3822 | nesvnic->event_timer.function = nes_handle_delayed_event; |
3823 | nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; | 3823 | nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; |
3824 | add_timer(&nesvnic->event_timer); | 3824 | add_timer(&nesvnic->event_timer); |
3825 | } else { | 3825 | } else { |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 44916ef4a424..e30642db50d5 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -2047,7 +2047,7 @@ static void devm_input_device_unregister(struct device *dev, void *res) | |||
2047 | */ | 2047 | */ |
2048 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period) | 2048 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period) |
2049 | { | 2049 | { |
2050 | dev->timer.function = (TIMER_FUNC_TYPE)input_repeat_key; | 2050 | dev->timer.function = input_repeat_key; |
2051 | dev->rep[REP_DELAY] = delay; | 2051 | dev->rep[REP_DELAY] = delay; |
2052 | dev->rep[REP_PERIOD] = period; | 2052 | dev->rep[REP_PERIOD] = period; |
2053 | } | 2053 | } |
diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c index ce8d78c137f0..e1d369b976ed 100644 --- a/drivers/media/common/saa7146/saa7146_vbi.c +++ b/drivers/media/common/saa7146/saa7146_vbi.c | |||
@@ -402,7 +402,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file) | |||
402 | sizeof(struct saa7146_buf), | 402 | sizeof(struct saa7146_buf), |
403 | file, &dev->v4l2_lock); | 403 | file, &dev->v4l2_lock); |
404 | 404 | ||
405 | vv->vbi_read_timeout.function = (TIMER_FUNC_TYPE)vbi_read_timeout; | 405 | vv->vbi_read_timeout.function = vbi_read_timeout; |
406 | vv->vbi_read_timeout_file = file; | 406 | vv->vbi_read_timeout_file = file; |
407 | 407 | ||
408 | /* initialize the brs */ | 408 | /* initialize the brs */ |
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 8f53d762fbc4..5a4e78fde530 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c | |||
@@ -254,7 +254,7 @@ tlan_set_timer(struct net_device *dev, u32 ticks, u32 type) | |||
254 | spin_unlock_irqrestore(&priv->lock, flags); | 254 | spin_unlock_irqrestore(&priv->lock, flags); |
255 | return; | 255 | return; |
256 | } | 256 | } |
257 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 257 | priv->timer.function = tlan_timer; |
258 | if (!in_irq()) | 258 | if (!in_irq()) |
259 | spin_unlock_irqrestore(&priv->lock, flags); | 259 | spin_unlock_irqrestore(&priv->lock, flags); |
260 | 260 | ||
@@ -1425,7 +1425,7 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int) | |||
1425 | tlan_dio_write8(dev->base_addr, | 1425 | tlan_dio_write8(dev->base_addr, |
1426 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); | 1426 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); |
1427 | if (priv->timer.function == NULL) { | 1427 | if (priv->timer.function == NULL) { |
1428 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 1428 | priv->timer.function = tlan_timer; |
1429 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; | 1429 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; |
1430 | priv->timer_set_at = jiffies; | 1430 | priv->timer_set_at = jiffies; |
1431 | priv->timer_type = TLAN_TIMER_ACTIVITY; | 1431 | priv->timer_type = TLAN_TIMER_ACTIVITY; |
@@ -1576,7 +1576,7 @@ drop_and_reuse: | |||
1576 | tlan_dio_write8(dev->base_addr, | 1576 | tlan_dio_write8(dev->base_addr, |
1577 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); | 1577 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); |
1578 | if (priv->timer.function == NULL) { | 1578 | if (priv->timer.function == NULL) { |
1579 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 1579 | priv->timer.function = tlan_timer; |
1580 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; | 1580 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; |
1581 | priv->timer_set_at = jiffies; | 1581 | priv->timer_set_at = jiffies; |
1582 | priv->timer_type = TLAN_TIMER_ACTIVITY; | 1582 | priv->timer_type = TLAN_TIMER_ACTIVITY; |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index c9f7215c5dc2..3de272959090 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -1005,7 +1005,7 @@ static void __scc_start_tx_timer(struct scc_channel *scc, | |||
1005 | } else | 1005 | } else |
1006 | if (when != TIMER_OFF) | 1006 | if (when != TIMER_OFF) |
1007 | { | 1007 | { |
1008 | scc->tx_t.function = (TIMER_FUNC_TYPE)handler; | 1008 | scc->tx_t.function = handler; |
1009 | scc->tx_t.expires = jiffies + (when*HZ)/100; | 1009 | scc->tx_t.expires = jiffies + (when*HZ)/100; |
1010 | add_timer(&scc->tx_t); | 1010 | add_timer(&scc->tx_t); |
1011 | } | 1011 | } |
@@ -1031,7 +1031,7 @@ static void scc_start_defer(struct scc_channel *scc) | |||
1031 | 1031 | ||
1032 | if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF) | 1032 | if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF) |
1033 | { | 1033 | { |
1034 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_busy; | 1034 | scc->tx_wdog.function = t_busy; |
1035 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer; | 1035 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer; |
1036 | add_timer(&scc->tx_wdog); | 1036 | add_timer(&scc->tx_wdog); |
1037 | } | 1037 | } |
@@ -1047,7 +1047,7 @@ static void scc_start_maxkeyup(struct scc_channel *scc) | |||
1047 | 1047 | ||
1048 | if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF) | 1048 | if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF) |
1049 | { | 1049 | { |
1050 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_maxkeyup; | 1050 | scc->tx_wdog.function = t_maxkeyup; |
1051 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup; | 1051 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup; |
1052 | add_timer(&scc->tx_wdog); | 1052 | add_timer(&scc->tx_wdog); |
1053 | } | 1053 | } |
@@ -1428,7 +1428,7 @@ scc_start_calibrate(struct scc_channel *scc, int duration, unsigned char pattern | |||
1428 | 1428 | ||
1429 | del_timer(&scc->tx_wdog); | 1429 | del_timer(&scc->tx_wdog); |
1430 | 1430 | ||
1431 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)scc_stop_calibrate; | 1431 | scc->tx_wdog.function = scc_stop_calibrate; |
1432 | scc->tx_wdog.expires = jiffies + HZ*duration; | 1432 | scc->tx_wdog.expires = jiffies + HZ*duration; |
1433 | add_timer(&scc->tx_wdog); | 1433 | add_timer(&scc->tx_wdog); |
1434 | 1434 | ||
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 7d6dc76c930a..6711e7fb6926 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | |||
@@ -554,7 +554,7 @@ qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | |||
554 | return -EFAULT; | 554 | return -EFAULT; |
555 | } | 555 | } |
556 | 556 | ||
557 | mac->scan_timeout.function = (TIMER_FUNC_TYPE)qtnf_scan_timeout; | 557 | mac->scan_timeout.function = qtnf_scan_timeout; |
558 | mod_timer(&mac->scan_timeout, | 558 | mod_timer(&mac->scan_timeout, |
559 | jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); | 559 | jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); |
560 | 560 | ||
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index d8afcdfca1ed..0133fcd4601b 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -569,7 +569,7 @@ static int dl_startup_params(struct net_device *dev) | |||
569 | local->card_status = CARD_DL_PARAM; | 569 | local->card_status = CARD_DL_PARAM; |
570 | /* Start kernel timer to wait for dl startup to complete. */ | 570 | /* Start kernel timer to wait for dl startup to complete. */ |
571 | local->timer.expires = jiffies + HZ / 2; | 571 | local->timer.expires = jiffies + HZ / 2; |
572 | local->timer.function = (TIMER_FUNC_TYPE)verify_dl_startup; | 572 | local->timer.function = verify_dl_startup; |
573 | add_timer(&local->timer); | 573 | add_timer(&local->timer); |
574 | dev_dbg(&link->dev, | 574 | dev_dbg(&link->dev, |
575 | "ray_cs dl_startup_params started timer for verify_dl_startup\n"); | 575 | "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) | |||
1947 | dev_dbg(&link->dev, | 1947 | dev_dbg(&link->dev, |
1948 | "ray_cs interrupt network \"%s\" start failed\n", | 1948 | "ray_cs interrupt network \"%s\" start failed\n", |
1949 | memtmp); | 1949 | memtmp); |
1950 | local->timer.function = (TIMER_FUNC_TYPE)start_net; | 1950 | local->timer.function = start_net; |
1951 | } else { | 1951 | } else { |
1952 | dev_dbg(&link->dev, | 1952 | dev_dbg(&link->dev, |
1953 | "ray_cs interrupt network \"%s\" join failed\n", | 1953 | "ray_cs interrupt network \"%s\" join failed\n", |
1954 | memtmp); | 1954 | memtmp); |
1955 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 1955 | local->timer.function = join_net; |
1956 | } | 1956 | } |
1957 | add_timer(&local->timer); | 1957 | add_timer(&local->timer); |
1958 | } | 1958 | } |
@@ -2417,9 +2417,9 @@ static void authenticate(ray_dev_t *local) | |||
2417 | 2417 | ||
2418 | del_timer(&local->timer); | 2418 | del_timer(&local->timer); |
2419 | if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { | 2419 | if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { |
2420 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 2420 | local->timer.function = join_net; |
2421 | } else { | 2421 | } else { |
2422 | local->timer.function = (TIMER_FUNC_TYPE)authenticate_timeout; | 2422 | local->timer.function = authenticate_timeout; |
2423 | } | 2423 | } |
2424 | local->timer.expires = jiffies + HZ * 2; | 2424 | local->timer.expires = jiffies + HZ * 2; |
2425 | add_timer(&local->timer); | 2425 | add_timer(&local->timer); |
@@ -2502,7 +2502,7 @@ static void associate(ray_dev_t *local) | |||
2502 | 2502 | ||
2503 | del_timer(&local->timer); | 2503 | del_timer(&local->timer); |
2504 | local->timer.expires = jiffies + HZ * 2; | 2504 | local->timer.expires = jiffies + HZ * 2; |
2505 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 2505 | local->timer.function = join_net; |
2506 | add_timer(&local->timer); | 2506 | add_timer(&local->timer); |
2507 | local->card_status = CARD_ASSOC_FAILED; | 2507 | local->card_status = CARD_ASSOC_FAILED; |
2508 | return; | 2508 | return; |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 9b4c61c1e309..e4e2df7a478e 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -158,7 +158,7 @@ static inline void | |||
158 | __sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) | 158 | __sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) |
159 | { | 159 | { |
160 | del_timer(&sclp_request_timer); | 160 | del_timer(&sclp_request_timer); |
161 | sclp_request_timer.function = (TIMER_FUNC_TYPE)cb; | 161 | sclp_request_timer.function = cb; |
162 | sclp_request_timer.expires = jiffies + time; | 162 | sclp_request_timer.expires = jiffies + time; |
163 | add_timer(&sclp_request_timer); | 163 | add_timer(&sclp_request_timer); |
164 | } | 164 | } |
@@ -566,7 +566,7 @@ sclp_sync_wait(void) | |||
566 | if (timer_pending(&sclp_request_timer) && | 566 | if (timer_pending(&sclp_request_timer) && |
567 | get_tod_clock_fast() > timeout && | 567 | get_tod_clock_fast() > timeout && |
568 | del_timer(&sclp_request_timer)) | 568 | del_timer(&sclp_request_timer)) |
569 | sclp_request_timer.function((TIMER_DATA_TYPE)&sclp_request_timer); | 569 | sclp_request_timer.function(&sclp_request_timer); |
570 | cpu_relax(); | 570 | cpu_relax(); |
571 | } | 571 | } |
572 | local_irq_disable(); | 572 | local_irq_disable(); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 51b81c0a0652..b12cb81ad8a2 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -34,7 +34,7 @@ static void zfcp_fsf_request_timeout_handler(struct timer_list *t) | |||
34 | static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, | 34 | static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, |
35 | unsigned long timeout) | 35 | unsigned long timeout) |
36 | { | 36 | { |
37 | fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_fsf_request_timeout_handler; | 37 | fsf_req->timer.function = zfcp_fsf_request_timeout_handler; |
38 | fsf_req->timer.expires = jiffies + timeout; | 38 | fsf_req->timer.expires = jiffies + timeout; |
39 | add_timer(&fsf_req->timer); | 39 | add_timer(&fsf_req->timer); |
40 | } | 40 | } |
@@ -42,7 +42,7 @@ static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, | |||
42 | static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) | 42 | static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) |
43 | { | 43 | { |
44 | BUG_ON(!fsf_req->erp_action); | 44 | BUG_ON(!fsf_req->erp_action); |
45 | fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_erp_timeout_handler; | 45 | fsf_req->timer.function = zfcp_erp_timeout_handler; |
46 | fsf_req->timer.expires = jiffies + 30 * HZ; | 46 | fsf_req->timer.expires = jiffies + 30 * HZ; |
47 | add_timer(&fsf_req->timer); | 47 | add_timer(&fsf_req->timer); |
48 | } | 48 | } |
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index 5402b85b0bdc..2dbc8330d7d3 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c | |||
@@ -1175,7 +1175,7 @@ static void asd_start_scb_timers(struct list_head *list) | |||
1175 | struct asd_ascb *ascb; | 1175 | struct asd_ascb *ascb; |
1176 | list_for_each_entry(ascb, list, list) { | 1176 | list_for_each_entry(ascb, list, list) { |
1177 | if (!ascb->uldd_timer) { | 1177 | if (!ascb->uldd_timer) { |
1178 | ascb->timer.function = (TIMER_FUNC_TYPE)asd_ascb_timedout; | 1178 | ascb->timer.function = asd_ascb_timedout; |
1179 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; | 1179 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; |
1180 | add_timer(&ascb->timer); | 1180 | add_timer(&ascb->timer); |
1181 | } | 1181 | } |
diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 4637119c09d8..2a01702d5ba7 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c | |||
@@ -42,7 +42,7 @@ static int asd_enqueue_internal(struct asd_ascb *ascb, | |||
42 | ascb->tasklet_complete = tasklet_complete; | 42 | ascb->tasklet_complete = tasklet_complete; |
43 | ascb->uldd_timer = 1; | 43 | ascb->uldd_timer = 1; |
44 | 44 | ||
45 | ascb->timer.function = (TIMER_FUNC_TYPE)timed_out; | 45 | ascb->timer.function = timed_out; |
46 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; | 46 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; |
47 | 47 | ||
48 | add_timer(&ascb->timer); | 48 | add_timer(&ascb->timer); |
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index be96aa1e5077..b3cfdd5f4d1c 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -5279,7 +5279,7 @@ static void beiscsi_hw_health_check(struct timer_list *t) | |||
5279 | if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state)) | 5279 | if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state)) |
5280 | return; | 5280 | return; |
5281 | /* modify this timer to check TPE */ | 5281 | /* modify this timer to check TPE */ |
5282 | phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_tpe_check; | 5282 | phba->hw_check.function = beiscsi_hw_tpe_check; |
5283 | } | 5283 | } |
5284 | 5284 | ||
5285 | mod_timer(&phba->hw_check, | 5285 | mod_timer(&phba->hw_check, |
@@ -5367,7 +5367,7 @@ static int beiscsi_enable_port(struct beiscsi_hba *phba) | |||
5367 | * Timer function gets modified for TPE detection. | 5367 | * Timer function gets modified for TPE detection. |
5368 | * Always reinit to do health check first. | 5368 | * Always reinit to do health check first. |
5369 | */ | 5369 | */ |
5370 | phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_health_check; | 5370 | phba->hw_check.function = beiscsi_hw_health_check; |
5371 | mod_timer(&phba->hw_check, | 5371 | mod_timer(&phba->hw_check, |
5372 | jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL)); | 5372 | jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL)); |
5373 | return 0; | 5373 | return 0; |
diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c index babd79361a46..bf07735275a4 100644 --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | |||
@@ -586,8 +586,8 @@ static int do_act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
586 | cxgbi_sock_get(csk); | 586 | cxgbi_sock_get(csk); |
587 | spin_lock_bh(&csk->lock); | 587 | spin_lock_bh(&csk->lock); |
588 | if (rpl->status == CPL_ERR_CONN_EXIST && | 588 | if (rpl->status == CPL_ERR_CONN_EXIST && |
589 | csk->retry_timer.function != (TIMER_FUNC_TYPE)act_open_retry_timer) { | 589 | csk->retry_timer.function != act_open_retry_timer) { |
590 | csk->retry_timer.function = (TIMER_FUNC_TYPE)act_open_retry_timer; | 590 | csk->retry_timer.function = act_open_retry_timer; |
591 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); | 591 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); |
592 | } else | 592 | } else |
593 | cxgbi_sock_fail_act_open(csk, | 593 | cxgbi_sock_fail_act_open(csk, |
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 266eddf17a99..406e94312d4e 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
@@ -963,8 +963,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
963 | spin_lock_bh(&csk->lock); | 963 | spin_lock_bh(&csk->lock); |
964 | 964 | ||
965 | if (status == CPL_ERR_CONN_EXIST && | 965 | if (status == CPL_ERR_CONN_EXIST && |
966 | csk->retry_timer.function != (TIMER_FUNC_TYPE)csk_act_open_retry_timer) { | 966 | csk->retry_timer.function != csk_act_open_retry_timer) { |
967 | csk->retry_timer.function = (TIMER_FUNC_TYPE)csk_act_open_retry_timer; | 967 | csk->retry_timer.function = csk_act_open_retry_timer; |
968 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); | 968 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); |
969 | } else | 969 | } else |
970 | cxgbi_sock_fail_act_open(csk, | 970 | cxgbi_sock_fail_act_open(csk, |
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 61a85ff8e459..5f503cb09508 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c | |||
@@ -839,7 +839,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, | |||
839 | } | 839 | } |
840 | task->task_done = hisi_sas_task_done; | 840 | task->task_done = hisi_sas_task_done; |
841 | 841 | ||
842 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; | 842 | task->slow_task->timer.function = hisi_sas_tmf_timedout; |
843 | task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; | 843 | task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; |
844 | add_timer(&task->slow_task->timer); | 844 | add_timer(&task->slow_task->timer); |
845 | 845 | ||
@@ -1451,7 +1451,7 @@ hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, | |||
1451 | task->dev = device; | 1451 | task->dev = device; |
1452 | task->task_proto = device->tproto; | 1452 | task->task_proto = device->tproto; |
1453 | task->task_done = hisi_sas_task_done; | 1453 | task->task_done = hisi_sas_task_done; |
1454 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; | 1454 | task->slow_task->timer.function = hisi_sas_tmf_timedout; |
1455 | task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110); | 1455 | task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110); |
1456 | add_timer(&task->slow_task->timer); | 1456 | add_timer(&task->slow_task->timer); |
1457 | 1457 | ||
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index d02c2a791981..5d3467fd728d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | |||
@@ -1268,7 +1268,7 @@ static void link_timeout_enable_link(struct timer_list *t) | |||
1268 | } | 1268 | } |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; | 1271 | hisi_hba->timer.function = link_timeout_disable_link; |
1272 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); | 1272 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); |
1273 | } | 1273 | } |
1274 | 1274 | ||
@@ -1289,13 +1289,13 @@ static void link_timeout_disable_link(struct timer_list *t) | |||
1289 | } | 1289 | } |
1290 | } | 1290 | } |
1291 | 1291 | ||
1292 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_enable_link; | 1292 | hisi_hba->timer.function = link_timeout_enable_link; |
1293 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); | 1293 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | static void set_link_timer_quirk(struct hisi_hba *hisi_hba) | 1296 | static void set_link_timer_quirk(struct hisi_hba *hisi_hba) |
1297 | { | 1297 | { |
1298 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; | 1298 | hisi_hba->timer.function = link_timeout_disable_link; |
1299 | hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); | 1299 | hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); |
1300 | add_timer(&hisi_hba->timer); | 1300 | add_timer(&hisi_hba->timer); |
1301 | } | 1301 | } |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index d53429371127..cc0187965eee 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -997,7 +997,7 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd, | |||
997 | ipr_cmd->done = done; | 997 | ipr_cmd->done = done; |
998 | 998 | ||
999 | ipr_cmd->timer.expires = jiffies + timeout; | 999 | ipr_cmd->timer.expires = jiffies + timeout; |
1000 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; | 1000 | ipr_cmd->timer.function = timeout_func; |
1001 | 1001 | ||
1002 | add_timer(&ipr_cmd->timer); | 1002 | add_timer(&ipr_cmd->timer); |
1003 | 1003 | ||
@@ -8312,7 +8312,7 @@ static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd, | |||
8312 | ipr_cmd->done = ipr_reset_ioa_job; | 8312 | ipr_cmd->done = ipr_reset_ioa_job; |
8313 | 8313 | ||
8314 | ipr_cmd->timer.expires = jiffies + timeout; | 8314 | ipr_cmd->timer.expires = jiffies + timeout; |
8315 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_reset_timer_done; | 8315 | ipr_cmd->timer.function = ipr_reset_timer_done; |
8316 | add_timer(&ipr_cmd->timer); | 8316 | add_timer(&ipr_cmd->timer); |
8317 | } | 8317 | } |
8318 | 8318 | ||
@@ -8397,7 +8397,7 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd) | |||
8397 | } | 8397 | } |
8398 | 8398 | ||
8399 | ipr_cmd->timer.expires = jiffies + stage_time * HZ; | 8399 | ipr_cmd->timer.expires = jiffies + stage_time * HZ; |
8400 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; | 8400 | ipr_cmd->timer.function = ipr_oper_timeout; |
8401 | ipr_cmd->done = ipr_reset_ioa_job; | 8401 | ipr_cmd->done = ipr_reset_ioa_job; |
8402 | add_timer(&ipr_cmd->timer); | 8402 | add_timer(&ipr_cmd->timer); |
8403 | 8403 | ||
@@ -8468,7 +8468,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd) | |||
8468 | } | 8468 | } |
8469 | 8469 | ||
8470 | ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); | 8470 | ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); |
8471 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; | 8471 | ipr_cmd->timer.function = ipr_oper_timeout; |
8472 | ipr_cmd->done = ipr_reset_ioa_job; | 8472 | ipr_cmd->done = ipr_reset_ioa_job; |
8473 | add_timer(&ipr_cmd->timer); | 8473 | add_timer(&ipr_cmd->timer); |
8474 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q); | 8474 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q); |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 1a4e701a8449..4fae253d4f3d 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -1214,7 +1214,7 @@ static int fc_fcp_cmd_send(struct fc_lport *lport, struct fc_fcp_pkt *fsp, | |||
1214 | fsp->seq_ptr = seq; | 1214 | fsp->seq_ptr = seq; |
1215 | fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */ | 1215 | fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */ |
1216 | 1216 | ||
1217 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; | 1217 | fsp->timer.function = fc_fcp_timeout; |
1218 | if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) | 1218 | if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) |
1219 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); | 1219 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); |
1220 | 1220 | ||
@@ -1307,7 +1307,7 @@ static void fc_lun_reset_send(struct timer_list *t) | |||
1307 | return; | 1307 | return; |
1308 | if (fc_fcp_lock_pkt(fsp)) | 1308 | if (fc_fcp_lock_pkt(fsp)) |
1309 | return; | 1309 | return; |
1310 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_lun_reset_send; | 1310 | fsp->timer.function = fc_lun_reset_send; |
1311 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); | 1311 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); |
1312 | fc_fcp_unlock_pkt(fsp); | 1312 | fc_fcp_unlock_pkt(fsp); |
1313 | } | 1313 | } |
@@ -1445,7 +1445,7 @@ static void fc_fcp_timeout(struct timer_list *t) | |||
1445 | if (fsp->lp->qfull) { | 1445 | if (fsp->lp->qfull) { |
1446 | FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n", | 1446 | FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n", |
1447 | fsp->timer_delay); | 1447 | fsp->timer_delay); |
1448 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; | 1448 | fsp->timer.function = fc_fcp_timeout; |
1449 | fc_fcp_timer_set(fsp, fsp->timer_delay); | 1449 | fc_fcp_timer_set(fsp, fsp->timer_delay); |
1450 | goto unlock; | 1450 | goto unlock; |
1451 | } | 1451 | } |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 174e5eff6155..ca1566237ae7 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -92,7 +92,7 @@ static int smp_execute_task_sg(struct domain_device *dev, | |||
92 | 92 | ||
93 | task->task_done = smp_task_done; | 93 | task->task_done = smp_task_done; |
94 | 94 | ||
95 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)smp_task_timedout; | 95 | task->slow_task->timer.function = smp_task_timedout; |
96 | task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ; | 96 | task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ; |
97 | add_timer(&task->slow_task->timer); | 97 | add_timer(&task->slow_task->timer); |
98 | 98 | ||
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 91795eb56206..58476b728c57 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -919,7 +919,7 @@ void sas_task_abort(struct sas_task *task) | |||
919 | return; | 919 | return; |
920 | if (!del_timer(&slow->timer)) | 920 | if (!del_timer(&slow->timer)) |
921 | return; | 921 | return; |
922 | slow->timer.function((TIMER_DATA_TYPE)&slow->timer); | 922 | slow->timer.function(&slow->timer); |
923 | return; | 923 | return; |
924 | } | 924 | } |
925 | 925 | ||
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index cff1c37b8d2e..cff43bd9f675 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c | |||
@@ -1310,7 +1310,7 @@ static int mvs_exec_internal_tmf_task(struct domain_device *dev, | |||
1310 | memcpy(&task->ssp_task, parameter, para_len); | 1310 | memcpy(&task->ssp_task, parameter, para_len); |
1311 | task->task_done = mvs_task_done; | 1311 | task->task_done = mvs_task_done; |
1312 | 1312 | ||
1313 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)mvs_tmf_timedout; | 1313 | task->slow_task->timer.function = mvs_tmf_timedout; |
1314 | task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ; | 1314 | task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ; |
1315 | add_timer(&task->slow_task->timer); | 1315 | add_timer(&task->slow_task->timer); |
1316 | 1316 | ||
@@ -2020,7 +2020,7 @@ void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events) | |||
2020 | MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, | 2020 | MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, |
2021 | tmp | PHYEV_SIG_FIS); | 2021 | tmp | PHYEV_SIG_FIS); |
2022 | if (phy->timer.function == NULL) { | 2022 | if (phy->timer.function == NULL) { |
2023 | phy->timer.function = (TIMER_FUNC_TYPE)mvs_sig_time_out; | 2023 | phy->timer.function = mvs_sig_time_out; |
2024 | phy->timer.expires = jiffies + 5*HZ; | 2024 | phy->timer.expires = jiffies + 5*HZ; |
2025 | add_timer(&phy->timer); | 2025 | add_timer(&phy->timer); |
2026 | } | 2026 | } |
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 0e294e80c169..947d6017d004 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c | |||
@@ -695,7 +695,7 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev, | |||
695 | task->task_proto = dev->tproto; | 695 | task->task_proto = dev->tproto; |
696 | memcpy(&task->ssp_task, parameter, para_len); | 696 | memcpy(&task->ssp_task, parameter, para_len); |
697 | task->task_done = pm8001_task_done; | 697 | task->task_done = pm8001_task_done; |
698 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; | 698 | task->slow_task->timer.function = pm8001_tmf_timedout; |
699 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ; | 699 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ; |
700 | add_timer(&task->slow_task->timer); | 700 | add_timer(&task->slow_task->timer); |
701 | 701 | ||
@@ -781,7 +781,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, | |||
781 | task->dev = dev; | 781 | task->dev = dev; |
782 | task->task_proto = dev->tproto; | 782 | task->task_proto = dev->tproto; |
783 | task->task_done = pm8001_task_done; | 783 | task->task_done = pm8001_task_done; |
784 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; | 784 | task->slow_task->timer.function = pm8001_tmf_timedout; |
785 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ; | 785 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ; |
786 | add_timer(&task->slow_task->timer); | 786 | add_timer(&task->slow_task->timer); |
787 | 787 | ||
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 4f9f115fb6a0..e58be98430b0 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -604,7 +604,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd) | |||
604 | 604 | ||
605 | cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); | 605 | cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); |
606 | cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); | 606 | cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); |
607 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_bist_done; | 607 | cmd->timer.function = pmcraid_bist_done; |
608 | add_timer(&cmd->timer); | 608 | add_timer(&cmd->timer); |
609 | } | 609 | } |
610 | 610 | ||
@@ -636,7 +636,7 @@ static void pmcraid_reset_alert_done(struct timer_list *t) | |||
636 | /* restart timer if some more time is available to wait */ | 636 | /* restart timer if some more time is available to wait */ |
637 | cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 637 | cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
638 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 638 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
639 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; | 639 | cmd->timer.function = pmcraid_reset_alert_done; |
640 | add_timer(&cmd->timer); | 640 | add_timer(&cmd->timer); |
641 | } | 641 | } |
642 | } | 642 | } |
@@ -673,7 +673,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd) | |||
673 | */ | 673 | */ |
674 | cmd->time_left = PMCRAID_RESET_TIMEOUT; | 674 | cmd->time_left = PMCRAID_RESET_TIMEOUT; |
675 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 675 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
676 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; | 676 | cmd->timer.function = pmcraid_reset_alert_done; |
677 | add_timer(&cmd->timer); | 677 | add_timer(&cmd->timer); |
678 | 678 | ||
679 | iowrite32(DOORBELL_IOA_RESET_ALERT, | 679 | iowrite32(DOORBELL_IOA_RESET_ALERT, |
@@ -923,7 +923,7 @@ static void pmcraid_send_cmd( | |||
923 | if (timeout_func) { | 923 | if (timeout_func) { |
924 | /* setup timeout handler */ | 924 | /* setup timeout handler */ |
925 | cmd->timer.expires = jiffies + timeout; | 925 | cmd->timer.expires = jiffies + timeout; |
926 | cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; | 926 | cmd->timer.function = timeout_func; |
927 | add_timer(&cmd->timer); | 927 | add_timer(&cmd->timer); |
928 | } | 928 | } |
929 | 929 | ||
@@ -1951,7 +1951,7 @@ static void pmcraid_soft_reset(struct pmcraid_cmd *cmd) | |||
1951 | cmd->cmd_done = pmcraid_ioa_reset; | 1951 | cmd->cmd_done = pmcraid_ioa_reset; |
1952 | cmd->timer.expires = jiffies + | 1952 | cmd->timer.expires = jiffies + |
1953 | msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT); | 1953 | msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT); |
1954 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_timeout_handler; | 1954 | cmd->timer.function = pmcraid_timeout_handler; |
1955 | 1955 | ||
1956 | if (!timer_pending(&cmd->timer)) | 1956 | if (!timer_pending(&cmd->timer)) |
1957 | add_timer(&cmd->timer); | 1957 | add_timer(&cmd->timer); |
diff --git a/drivers/staging/irda/include/net/irda/timer.h b/drivers/staging/irda/include/net/irda/timer.h index a6635f0afae9..6dab15f5dae1 100644 --- a/drivers/staging/irda/include/net/irda/timer.h +++ b/drivers/staging/irda/include/net/irda/timer.h | |||
@@ -75,7 +75,7 @@ struct lap_cb; | |||
75 | static inline void irda_start_timer(struct timer_list *ptimer, int timeout, | 75 | static inline void irda_start_timer(struct timer_list *ptimer, int timeout, |
76 | void (*callback)(struct timer_list *)) | 76 | void (*callback)(struct timer_list *)) |
77 | { | 77 | { |
78 | ptimer->function = (TIMER_FUNC_TYPE) callback; | 78 | ptimer->function = callback; |
79 | 79 | ||
80 | /* Set new value for timer (update or add timer). | 80 | /* Set new value for timer (update or add timer). |
81 | * We use mod_timer() because it's more efficient and also | 81 | * We use mod_timer() because it's more efficient and also |
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index d64afdd93872..9342fc2ee7df 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
@@ -325,7 +325,7 @@ static int univ8250_setup_irq(struct uart_8250_port *up) | |||
325 | if (up->bugs & UART_BUG_THRE) { | 325 | if (up->bugs & UART_BUG_THRE) { |
326 | pr_debug("ttyS%d - using backup timer\n", serial_index(port)); | 326 | pr_debug("ttyS%d - using backup timer\n", serial_index(port)); |
327 | 327 | ||
328 | up->timer.function = (TIMER_FUNC_TYPE)serial8250_backup_timeout; | 328 | up->timer.function = serial8250_backup_timeout; |
329 | mod_timer(&up->timer, jiffies + | 329 | mod_timer(&up->timer, jiffies + |
330 | uart_poll_timeout(port) + HZ / 5); | 330 | uart_poll_timeout(port) + HZ / 5); |
331 | } | 331 | } |
@@ -348,7 +348,7 @@ static void univ8250_release_irq(struct uart_8250_port *up) | |||
348 | struct uart_port *port = &up->port; | 348 | struct uart_port *port = &up->port; |
349 | 349 | ||
350 | del_timer_sync(&up->timer); | 350 | del_timer_sync(&up->timer); |
351 | up->timer.function = (TIMER_FUNC_TYPE)serial8250_timeout; | 351 | up->timer.function = serial8250_timeout; |
352 | if (port->irq) | 352 | if (port->irq) |
353 | serial_unlink_irq_chain(up); | 353 | serial_unlink_irq_chain(up); |
354 | } | 354 | } |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index dc850d257ea2..c1961761311d 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -118,7 +118,7 @@ struct kthread_delayed_work { | |||
118 | 118 | ||
119 | #define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \ | 119 | #define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \ |
120 | .work = KTHREAD_WORK_INIT((dwork).work, (fn)), \ | 120 | .work = KTHREAD_WORK_INIT((dwork).work, (fn)), \ |
121 | .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\ | 121 | .timer = __TIMER_INITIALIZER(kthread_delayed_work_timer_fn,\ |
122 | TIMER_IRQSAFE), \ | 122 | TIMER_IRQSAFE), \ |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index b1ae64b112c2..04af640ea95b 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -63,9 +63,6 @@ struct timer_list { | |||
63 | 63 | ||
64 | #define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) | 64 | #define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) |
65 | 65 | ||
66 | #define TIMER_DATA_TYPE struct timer_list * | ||
67 | #define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) | ||
68 | |||
69 | #define __TIMER_INITIALIZER(_function, _flags) { \ | 66 | #define __TIMER_INITIALIZER(_function, _flags) { \ |
70 | .entry = { .next = TIMER_ENTRY_STATIC }, \ | 67 | .entry = { .next = TIMER_ENTRY_STATIC }, \ |
71 | .function = (_function), \ | 68 | .function = (_function), \ |
@@ -76,7 +73,7 @@ struct timer_list { | |||
76 | 73 | ||
77 | #define DEFINE_TIMER(_name, _function) \ | 74 | #define DEFINE_TIMER(_name, _function) \ |
78 | struct timer_list _name = \ | 75 | struct timer_list _name = \ |
79 | __TIMER_INITIALIZER((TIMER_FUNC_TYPE)_function, 0) | 76 | __TIMER_INITIALIZER(_function, 0) |
80 | 77 | ||
81 | /* | 78 | /* |
82 | * LOCKDEP and DEBUG timer interfaces. | 79 | * LOCKDEP and DEBUG timer interfaces. |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index bff39faba793..4a54ef96aff5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -176,7 +176,7 @@ struct execute_work { | |||
176 | 176 | ||
177 | #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ | 177 | #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ |
178 | .work = __WORK_INITIALIZER((n).work, (f)), \ | 178 | .work = __WORK_INITIALIZER((n).work, (f)), \ |
179 | .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)delayed_work_timer_fn,\ | 179 | .timer = __TIMER_INITIALIZER(delayed_work_timer_fn,\ |
180 | (tflags) | TIMER_IRQSAFE), \ | 180 | (tflags) | TIMER_IRQSAFE), \ |
181 | } | 181 | } |
182 | 182 | ||
diff --git a/kernel/kthread.c b/kernel/kthread.c index 8af313081b0d..cd50e99202b0 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -843,7 +843,7 @@ void __kthread_queue_delayed_work(struct kthread_worker *worker, | |||
843 | struct timer_list *timer = &dwork->timer; | 843 | struct timer_list *timer = &dwork->timer; |
844 | struct kthread_work *work = &dwork->work; | 844 | struct kthread_work *work = &dwork->work; |
845 | 845 | ||
846 | WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn); | 846 | WARN_ON_ONCE(timer->function != kthread_delayed_work_timer_fn); |
847 | 847 | ||
848 | /* | 848 | /* |
849 | * If @delay is 0, queue @dwork->work immediately. This is for | 849 | * If @delay is 0, queue @dwork->work immediately. This is for |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dde6298f6b22..8fdb710bfdd7 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -1509,7 +1509,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq, | |||
1509 | struct work_struct *work = &dwork->work; | 1509 | struct work_struct *work = &dwork->work; |
1510 | 1510 | ||
1511 | WARN_ON_ONCE(!wq); | 1511 | WARN_ON_ONCE(!wq); |
1512 | WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)delayed_work_timer_fn); | 1512 | WARN_ON_ONCE(timer->function != delayed_work_timer_fn); |
1513 | WARN_ON_ONCE(timer_pending(timer)); | 1513 | WARN_ON_ONCE(timer_pending(timer)); |
1514 | WARN_ON_ONCE(!list_empty(&work->entry)); | 1514 | WARN_ON_ONCE(!list_empty(&work->entry)); |
1515 | 1515 | ||
diff --git a/net/atm/lec.c b/net/atm/lec.c index c976196da3ea..6676e3433261 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -1798,7 +1798,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | |||
1798 | else | 1798 | else |
1799 | send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL); | 1799 | send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL); |
1800 | entry->timer.expires = jiffies + (1 * HZ); | 1800 | entry->timer.expires = jiffies + (1 * HZ); |
1801 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_arp; | 1801 | entry->timer.function = lec_arp_expire_arp; |
1802 | add_timer(&entry->timer); | 1802 | add_timer(&entry->timer); |
1803 | found = priv->mcast_vcc; | 1803 | found = priv->mcast_vcc; |
1804 | } | 1804 | } |
@@ -1998,7 +1998,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
1998 | entry->old_recv_push = old_push; | 1998 | entry->old_recv_push = old_push; |
1999 | entry->status = ESI_UNKNOWN; | 1999 | entry->status = ESI_UNKNOWN; |
2000 | entry->timer.expires = jiffies + priv->vcc_timeout_period; | 2000 | entry->timer.expires = jiffies + priv->vcc_timeout_period; |
2001 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; | 2001 | entry->timer.function = lec_arp_expire_vcc; |
2002 | hlist_add_head(&entry->next, &priv->lec_no_forward); | 2002 | hlist_add_head(&entry->next, &priv->lec_no_forward); |
2003 | add_timer(&entry->timer); | 2003 | add_timer(&entry->timer); |
2004 | dump_arp_table(priv); | 2004 | dump_arp_table(priv); |
@@ -2082,7 +2082,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
2082 | entry->status = ESI_UNKNOWN; | 2082 | entry->status = ESI_UNKNOWN; |
2083 | hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); | 2083 | hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); |
2084 | entry->timer.expires = jiffies + priv->vcc_timeout_period; | 2084 | entry->timer.expires = jiffies + priv->vcc_timeout_period; |
2085 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; | 2085 | entry->timer.function = lec_arp_expire_vcc; |
2086 | add_timer(&entry->timer); | 2086 | add_timer(&entry->timer); |
2087 | pr_debug("After vcc was added\n"); | 2087 | pr_debug("After vcc was added\n"); |
2088 | dump_arp_table(priv); | 2088 | dump_arp_table(priv); |
diff --git a/net/can/proc.c b/net/can/proc.c index d979b3dc49a6..0c59f876fe6f 100644 --- a/net/can/proc.c +++ b/net/can/proc.c | |||
@@ -221,7 +221,7 @@ static int can_stats_proc_show(struct seq_file *m, void *v) | |||
221 | 221 | ||
222 | seq_putc(m, '\n'); | 222 | seq_putc(m, '\n'); |
223 | 223 | ||
224 | if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { | 224 | if (net->can.can_stattimer.function == can_stat_update) { |
225 | seq_printf(m, " %8ld %% total match ratio (RXMR)\n", | 225 | seq_printf(m, " %8ld %% total match ratio (RXMR)\n", |
226 | can_stats->total_rx_match_ratio); | 226 | can_stats->total_rx_match_ratio); |
227 | 227 | ||
@@ -291,7 +291,7 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v) | |||
291 | 291 | ||
292 | user_reset = 1; | 292 | user_reset = 1; |
293 | 293 | ||
294 | if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { | 294 | if (net->can.can_stattimer.function == can_stat_update) { |
295 | seq_printf(m, "Scheduled statistic reset #%ld.\n", | 295 | seq_printf(m, "Scheduled statistic reset #%ld.\n", |
296 | can_pstats->stats_reset + 1); | 296 | can_pstats->stats_reset + 1); |
297 | } else { | 297 | } else { |
diff --git a/net/lapb/lapb_timer.c b/net/lapb/lapb_timer.c index 8bb469cb3abe..5d4ae01951b5 100644 --- a/net/lapb/lapb_timer.c +++ b/net/lapb/lapb_timer.c | |||
@@ -42,7 +42,7 @@ void lapb_start_t1timer(struct lapb_cb *lapb) | |||
42 | { | 42 | { |
43 | del_timer(&lapb->t1timer); | 43 | del_timer(&lapb->t1timer); |
44 | 44 | ||
45 | lapb->t1timer.function = (TIMER_FUNC_TYPE)lapb_t1timer_expiry; | 45 | lapb->t1timer.function = lapb_t1timer_expiry; |
46 | lapb->t1timer.expires = jiffies + lapb->t1; | 46 | lapb->t1timer.expires = jiffies + lapb->t1; |
47 | 47 | ||
48 | add_timer(&lapb->t1timer); | 48 | add_timer(&lapb->t1timer); |
@@ -52,7 +52,7 @@ void lapb_start_t2timer(struct lapb_cb *lapb) | |||
52 | { | 52 | { |
53 | del_timer(&lapb->t2timer); | 53 | del_timer(&lapb->t2timer); |
54 | 54 | ||
55 | lapb->t2timer.function = (TIMER_FUNC_TYPE)lapb_t2timer_expiry; | 55 | lapb->t2timer.function = lapb_t2timer_expiry; |
56 | lapb->t2timer.expires = jiffies + lapb->t2; | 56 | lapb->t2timer.expires = jiffies + lapb->t2; |
57 | 57 | ||
58 | add_timer(&lapb->t2timer); | 58 | add_timer(&lapb->t2timer); |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 2dec3583c97d..7ed9d4422a73 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -284,7 +284,7 @@ void nr_destroy_socket(struct sock *sk) | |||
284 | 284 | ||
285 | if (sk_has_allocations(sk)) { | 285 | if (sk_has_allocations(sk)) { |
286 | /* Defer: outstanding buffers */ | 286 | /* Defer: outstanding buffers */ |
287 | sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_destroy_timer; | 287 | sk->sk_timer.function = nr_destroy_timer; |
288 | sk->sk_timer.expires = jiffies + 2 * HZ; | 288 | sk->sk_timer.expires = jiffies + 2 * HZ; |
289 | add_timer(&sk->sk_timer); | 289 | add_timer(&sk->sk_timer); |
290 | } else | 290 | } else |
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index 43569aea0f5e..cbd51ed5a2d7 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c | |||
@@ -45,7 +45,7 @@ void nr_init_timers(struct sock *sk) | |||
45 | timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); | 45 | timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); |
46 | 46 | ||
47 | /* initialized by sock_init_data */ | 47 | /* initialized by sock_init_data */ |
48 | sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_heartbeat_expiry; | 48 | sk->sk_timer.function = nr_heartbeat_expiry; |
49 | } | 49 | } |
50 | 50 | ||
51 | void nr_start_t1timer(struct sock *sk) | 51 | void nr_start_t1timer(struct sock *sk) |
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index cda4c6678ef1..62055d3069d2 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -37,7 +37,7 @@ void rose_start_ftimer(struct rose_neigh *neigh) | |||
37 | { | 37 | { |
38 | del_timer(&neigh->ftimer); | 38 | del_timer(&neigh->ftimer); |
39 | 39 | ||
40 | neigh->ftimer.function = (TIMER_FUNC_TYPE)rose_ftimer_expiry; | 40 | neigh->ftimer.function = rose_ftimer_expiry; |
41 | neigh->ftimer.expires = | 41 | neigh->ftimer.expires = |
42 | jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); | 42 | jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); |
43 | 43 | ||
@@ -48,7 +48,7 @@ static void rose_start_t0timer(struct rose_neigh *neigh) | |||
48 | { | 48 | { |
49 | del_timer(&neigh->t0timer); | 49 | del_timer(&neigh->t0timer); |
50 | 50 | ||
51 | neigh->t0timer.function = (TIMER_FUNC_TYPE)rose_t0timer_expiry; | 51 | neigh->t0timer.function = rose_t0timer_expiry; |
52 | neigh->t0timer.expires = | 52 | neigh->t0timer.expires = |
53 | jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); | 53 | jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); |
54 | 54 | ||
diff --git a/net/rose/rose_timer.c b/net/rose/rose_timer.c index ea613b2a9735..74555fb95615 100644 --- a/net/rose/rose_timer.c +++ b/net/rose/rose_timer.c | |||
@@ -36,7 +36,7 @@ void rose_start_heartbeat(struct sock *sk) | |||
36 | { | 36 | { |
37 | del_timer(&sk->sk_timer); | 37 | del_timer(&sk->sk_timer); |
38 | 38 | ||
39 | sk->sk_timer.function = (TIMER_FUNC_TYPE)rose_heartbeat_expiry; | 39 | sk->sk_timer.function = rose_heartbeat_expiry; |
40 | sk->sk_timer.expires = jiffies + 5 * HZ; | 40 | sk->sk_timer.expires = jiffies + 5 * HZ; |
41 | 41 | ||
42 | add_timer(&sk->sk_timer); | 42 | add_timer(&sk->sk_timer); |
@@ -48,7 +48,7 @@ void rose_start_t1timer(struct sock *sk) | |||
48 | 48 | ||
49 | del_timer(&rose->timer); | 49 | del_timer(&rose->timer); |
50 | 50 | ||
51 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 51 | rose->timer.function = rose_timer_expiry; |
52 | rose->timer.expires = jiffies + rose->t1; | 52 | rose->timer.expires = jiffies + rose->t1; |
53 | 53 | ||
54 | add_timer(&rose->timer); | 54 | add_timer(&rose->timer); |
@@ -60,7 +60,7 @@ void rose_start_t2timer(struct sock *sk) | |||
60 | 60 | ||
61 | del_timer(&rose->timer); | 61 | del_timer(&rose->timer); |
62 | 62 | ||
63 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 63 | rose->timer.function = rose_timer_expiry; |
64 | rose->timer.expires = jiffies + rose->t2; | 64 | rose->timer.expires = jiffies + rose->t2; |
65 | 65 | ||
66 | add_timer(&rose->timer); | 66 | add_timer(&rose->timer); |
@@ -72,7 +72,7 @@ void rose_start_t3timer(struct sock *sk) | |||
72 | 72 | ||
73 | del_timer(&rose->timer); | 73 | del_timer(&rose->timer); |
74 | 74 | ||
75 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 75 | rose->timer.function = rose_timer_expiry; |
76 | rose->timer.expires = jiffies + rose->t3; | 76 | rose->timer.expires = jiffies + rose->t3; |
77 | 77 | ||
78 | add_timer(&rose->timer); | 78 | add_timer(&rose->timer); |
@@ -84,7 +84,7 @@ void rose_start_hbtimer(struct sock *sk) | |||
84 | 84 | ||
85 | del_timer(&rose->timer); | 85 | del_timer(&rose->timer); |
86 | 86 | ||
87 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 87 | rose->timer.function = rose_timer_expiry; |
88 | rose->timer.expires = jiffies + rose->hb; | 88 | rose->timer.expires = jiffies + rose->hb; |
89 | 89 | ||
90 | add_timer(&rose->timer); | 90 | add_timer(&rose->timer); |
@@ -97,7 +97,7 @@ void rose_start_idletimer(struct sock *sk) | |||
97 | del_timer(&rose->idletimer); | 97 | del_timer(&rose->idletimer); |
98 | 98 | ||
99 | if (rose->idle > 0) { | 99 | if (rose->idle > 0) { |
100 | rose->idletimer.function = (TIMER_FUNC_TYPE)rose_idletimer_expiry; | 100 | rose->idletimer.function = rose_idletimer_expiry; |
101 | rose->idletimer.expires = jiffies + rose->idle; | 101 | rose->idletimer.expires = jiffies + rose->idle; |
102 | 102 | ||
103 | add_timer(&rose->idletimer); | 103 | add_timer(&rose->idletimer); |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index e8e0831229cf..f9307bd6644b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -745,7 +745,7 @@ static void svc_add_new_temp_xprt(struct svc_serv *serv, struct svc_xprt *newxpt | |||
745 | serv->sv_tmpcnt++; | 745 | serv->sv_tmpcnt++; |
746 | if (serv->sv_temptimer.function == NULL) { | 746 | if (serv->sv_temptimer.function == NULL) { |
747 | /* setup timer to age temp transports */ | 747 | /* setup timer to age temp transports */ |
748 | serv->sv_temptimer.function = (TIMER_FUNC_TYPE)svc_age_temp_xprts; | 748 | serv->sv_temptimer.function = svc_age_temp_xprts; |
749 | mod_timer(&serv->sv_temptimer, | 749 | mod_timer(&serv->sv_temptimer, |
750 | jiffies + svc_conn_age_period * HZ); | 750 | jiffies + svc_conn_age_period * HZ); |
751 | } | 751 | } |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index ea87143314f3..562cc11131f6 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -415,7 +415,7 @@ static void __x25_destroy_socket(struct sock *sk) | |||
415 | if (sk_has_allocations(sk)) { | 415 | if (sk_has_allocations(sk)) { |
416 | /* Defer: outstanding buffers */ | 416 | /* Defer: outstanding buffers */ |
417 | sk->sk_timer.expires = jiffies + 10 * HZ; | 417 | sk->sk_timer.expires = jiffies + 10 * HZ; |
418 | sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_destroy_timer; | 418 | sk->sk_timer.function = x25_destroy_timer; |
419 | add_timer(&sk->sk_timer); | 419 | add_timer(&sk->sk_timer); |
420 | } else { | 420 | } else { |
421 | /* drop last reference so sock_put will free */ | 421 | /* drop last reference so sock_put will free */ |
diff --git a/net/x25/x25_timer.c b/net/x25/x25_timer.c index 1dfba3c23459..fa3461002b3e 100644 --- a/net/x25/x25_timer.c +++ b/net/x25/x25_timer.c | |||
@@ -36,7 +36,7 @@ void x25_init_timers(struct sock *sk) | |||
36 | timer_setup(&x25->timer, x25_timer_expiry, 0); | 36 | timer_setup(&x25->timer, x25_timer_expiry, 0); |
37 | 37 | ||
38 | /* initialized by sock_init_data */ | 38 | /* initialized by sock_init_data */ |
39 | sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_heartbeat_expiry; | 39 | sk->sk_timer.function = x25_heartbeat_expiry; |
40 | } | 40 | } |
41 | 41 | ||
42 | void x25_start_heartbeat(struct sock *sk) | 42 | void x25_start_heartbeat(struct sock *sk) |
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index 4f9613e5fc9e..c1376bfdc90b 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c | |||
@@ -201,7 +201,7 @@ static int line6_send_raw_message_async_part(struct message *msg, | |||
201 | void line6_start_timer(struct timer_list *timer, unsigned long msecs, | 201 | void line6_start_timer(struct timer_list *timer, unsigned long msecs, |
202 | void (*function)(struct timer_list *t)) | 202 | void (*function)(struct timer_list *t)) |
203 | { | 203 | { |
204 | timer->function = (TIMER_FUNC_TYPE)function; | 204 | timer->function = function; |
205 | mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); | 205 | mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); |
206 | } | 206 | } |
207 | EXPORT_SYMBOL_GPL(line6_start_timer); | 207 | EXPORT_SYMBOL_GPL(line6_start_timer); |