diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-25 13:37:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-25 13:37:16 -0500 |
commit | 844056fd74ebdd826bd23a7d989597e15f478acb (patch) | |
tree | 25855ccc10878455acb61d38a62f92c1289912f8 /net | |
parent | ca122fe376fc43f7565e3e56e6777d06a433a4cc (diff) | |
parent | 54b8a2306b928abca4d3e9d7e2c17a4673032e1c (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner:
- The final conversion of timer wheel timers to timer_setup().
A few manual conversions and a large coccinelle assisted sweep and
the removal of the old initialization mechanisms and the related
code.
- Remove the now unused VSYSCALL update code
- Fix permissions of /proc/timer_list. I still need to get rid of that
file completely
- Rename a misnomed clocksource function and remove a stale declaration
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
m68k/macboing: Fix missed timer callback assignment
treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts
timer: Remove redundant __setup_timer*() macros
timer: Pass function down to initialization routines
timer: Remove unused data arguments from macros
timer: Switch callback prototype to take struct timer_list * argument
timer: Pass timer_list pointer to callbacks unconditionally
Coccinelle: Remove setup_timer.cocci
timer: Remove setup_*timer() interface
timer: Remove init_timer() interface
treewide: setup_timer() -> timer_setup() (2 field)
treewide: setup_timer() -> timer_setup()
treewide: init_timer() -> setup_timer()
treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
s390: cmm: Convert timers to use timer_setup()
lightnvm: Convert timers to use timer_setup()
drivers/net: cris: Convert timers to use timer_setup()
drm/vc4: Convert timers to use timer_setup()
block/laptop_mode: Convert timers to use timer_setup()
net/atm/mpc: Avoid open-coded assignment of timer callback function
...
Diffstat (limited to 'net')
42 files changed, 163 insertions, 184 deletions
diff --git a/net/802/garp.c b/net/802/garp.c index 2dac647ff420..7f50d47470bd 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -401,9 +401,9 @@ static void garp_join_timer_arm(struct garp_applicant *app) | |||
401 | mod_timer(&app->join_timer, jiffies + delay); | 401 | mod_timer(&app->join_timer, jiffies + delay); |
402 | } | 402 | } |
403 | 403 | ||
404 | static void garp_join_timer(unsigned long data) | 404 | static void garp_join_timer(struct timer_list *t) |
405 | { | 405 | { |
406 | struct garp_applicant *app = (struct garp_applicant *)data; | 406 | struct garp_applicant *app = from_timer(app, t, join_timer); |
407 | 407 | ||
408 | spin_lock(&app->lock); | 408 | spin_lock(&app->lock); |
409 | garp_gid_event(app, GARP_EVENT_TRANSMIT_PDU); | 409 | garp_gid_event(app, GARP_EVENT_TRANSMIT_PDU); |
@@ -584,7 +584,7 @@ int garp_init_applicant(struct net_device *dev, struct garp_application *appl) | |||
584 | spin_lock_init(&app->lock); | 584 | spin_lock_init(&app->lock); |
585 | skb_queue_head_init(&app->queue); | 585 | skb_queue_head_init(&app->queue); |
586 | rcu_assign_pointer(dev->garp_port->applicants[appl->type], app); | 586 | rcu_assign_pointer(dev->garp_port->applicants[appl->type], app); |
587 | setup_timer(&app->join_timer, garp_join_timer, (unsigned long)app); | 587 | timer_setup(&app->join_timer, garp_join_timer, 0); |
588 | garp_join_timer_arm(app); | 588 | garp_join_timer_arm(app); |
589 | return 0; | 589 | return 0; |
590 | 590 | ||
diff --git a/net/802/mrp.c b/net/802/mrp.c index be4dd3165347..a808dd5bbb27 100644 --- a/net/802/mrp.c +++ b/net/802/mrp.c | |||
@@ -586,9 +586,9 @@ static void mrp_join_timer_arm(struct mrp_applicant *app) | |||
586 | mod_timer(&app->join_timer, jiffies + delay); | 586 | mod_timer(&app->join_timer, jiffies + delay); |
587 | } | 587 | } |
588 | 588 | ||
589 | static void mrp_join_timer(unsigned long data) | 589 | static void mrp_join_timer(struct timer_list *t) |
590 | { | 590 | { |
591 | struct mrp_applicant *app = (struct mrp_applicant *)data; | 591 | struct mrp_applicant *app = from_timer(app, t, join_timer); |
592 | 592 | ||
593 | spin_lock(&app->lock); | 593 | spin_lock(&app->lock); |
594 | mrp_mad_event(app, MRP_EVENT_TX); | 594 | mrp_mad_event(app, MRP_EVENT_TX); |
@@ -605,9 +605,9 @@ static void mrp_periodic_timer_arm(struct mrp_applicant *app) | |||
605 | jiffies + msecs_to_jiffies(mrp_periodic_time)); | 605 | jiffies + msecs_to_jiffies(mrp_periodic_time)); |
606 | } | 606 | } |
607 | 607 | ||
608 | static void mrp_periodic_timer(unsigned long data) | 608 | static void mrp_periodic_timer(struct timer_list *t) |
609 | { | 609 | { |
610 | struct mrp_applicant *app = (struct mrp_applicant *)data; | 610 | struct mrp_applicant *app = from_timer(app, t, periodic_timer); |
611 | 611 | ||
612 | spin_lock(&app->lock); | 612 | spin_lock(&app->lock); |
613 | mrp_mad_event(app, MRP_EVENT_PERIODIC); | 613 | mrp_mad_event(app, MRP_EVENT_PERIODIC); |
@@ -865,10 +865,9 @@ int mrp_init_applicant(struct net_device *dev, struct mrp_application *appl) | |||
865 | spin_lock_init(&app->lock); | 865 | spin_lock_init(&app->lock); |
866 | skb_queue_head_init(&app->queue); | 866 | skb_queue_head_init(&app->queue); |
867 | rcu_assign_pointer(dev->mrp_port->applicants[appl->type], app); | 867 | rcu_assign_pointer(dev->mrp_port->applicants[appl->type], app); |
868 | setup_timer(&app->join_timer, mrp_join_timer, (unsigned long)app); | 868 | timer_setup(&app->join_timer, mrp_join_timer, 0); |
869 | mrp_join_timer_arm(app); | 869 | mrp_join_timer_arm(app); |
870 | setup_timer(&app->periodic_timer, mrp_periodic_timer, | 870 | timer_setup(&app->periodic_timer, mrp_periodic_timer, 0); |
871 | (unsigned long)app); | ||
872 | mrp_periodic_timer_arm(app); | 871 | mrp_periodic_timer_arm(app); |
873 | return 0; | 872 | return 0; |
874 | 873 | ||
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 8ad3ec2610b6..309d7dbb36e8 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -310,7 +310,7 @@ static void __aarp_expire_device(struct aarp_entry **n, struct net_device *dev) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | /* Handle the timer event */ | 312 | /* Handle the timer event */ |
313 | static void aarp_expire_timeout(unsigned long unused) | 313 | static void aarp_expire_timeout(struct timer_list *unused) |
314 | { | 314 | { |
315 | int ct; | 315 | int ct; |
316 | 316 | ||
@@ -884,7 +884,7 @@ void __init aarp_proto_init(void) | |||
884 | aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv); | 884 | aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv); |
885 | if (!aarp_dl) | 885 | if (!aarp_dl) |
886 | printk(KERN_CRIT "Unable to register AARP with SNAP.\n"); | 886 | printk(KERN_CRIT "Unable to register AARP with SNAP.\n"); |
887 | setup_timer(&aarp_timer, aarp_expire_timeout, 0); | 887 | timer_setup(&aarp_timer, aarp_expire_timeout, 0); |
888 | aarp_timer.expires = jiffies + sysctl_aarp_expiry_time; | 888 | aarp_timer.expires = jiffies + sysctl_aarp_expiry_time; |
889 | add_timer(&aarp_timer); | 889 | add_timer(&aarp_timer); |
890 | register_netdevice_notifier(&aarp_notifier); | 890 | register_netdevice_notifier(&aarp_notifier); |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 5d035c1f1156..03a9fc0771c0 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -158,9 +158,9 @@ found: | |||
158 | return s; | 158 | return s; |
159 | } | 159 | } |
160 | 160 | ||
161 | static void atalk_destroy_timer(unsigned long data) | 161 | static void atalk_destroy_timer(struct timer_list *t) |
162 | { | 162 | { |
163 | struct sock *sk = (struct sock *)data; | 163 | struct sock *sk = from_timer(sk, t, sk_timer); |
164 | 164 | ||
165 | if (sk_has_allocations(sk)) { | 165 | if (sk_has_allocations(sk)) { |
166 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; | 166 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; |
@@ -175,8 +175,7 @@ static inline void atalk_destroy_socket(struct sock *sk) | |||
175 | skb_queue_purge(&sk->sk_receive_queue); | 175 | skb_queue_purge(&sk->sk_receive_queue); |
176 | 176 | ||
177 | if (sk_has_allocations(sk)) { | 177 | if (sk_has_allocations(sk)) { |
178 | setup_timer(&sk->sk_timer, atalk_destroy_timer, | 178 | timer_setup(&sk->sk_timer, atalk_destroy_timer, 0); |
179 | (unsigned long)sk); | ||
180 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; | 179 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; |
181 | add_timer(&sk->sk_timer); | 180 | add_timer(&sk->sk_timer); |
182 | } else | 181 | } else |
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/atm/mpc.c b/net/atm/mpc.c index e882d8b5db05..7c6a1cc760a2 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -121,7 +121,7 @@ static struct notifier_block mpoa_notifier = { | |||
121 | 121 | ||
122 | struct mpoa_client *mpcs = NULL; /* FIXME */ | 122 | struct mpoa_client *mpcs = NULL; /* FIXME */ |
123 | static struct atm_mpoa_qos *qos_head = NULL; | 123 | static struct atm_mpoa_qos *qos_head = NULL; |
124 | static DEFINE_TIMER(mpc_timer, NULL); | 124 | static DEFINE_TIMER(mpc_timer, mpc_cache_check); |
125 | 125 | ||
126 | 126 | ||
127 | static struct mpoa_client *find_mpc_by_itfnum(int itf) | 127 | static struct mpoa_client *find_mpc_by_itfnum(int itf) |
@@ -1413,7 +1413,6 @@ static void mpc_timer_refresh(void) | |||
1413 | { | 1413 | { |
1414 | mpc_timer.expires = jiffies + (MPC_P2 * HZ); | 1414 | mpc_timer.expires = jiffies + (MPC_P2 * HZ); |
1415 | checking_time = mpc_timer.expires; | 1415 | checking_time = mpc_timer.expires; |
1416 | mpc_timer.function = (TIMER_FUNC_TYPE)mpc_cache_check; | ||
1417 | add_timer(&mpc_timer); | 1416 | add_timer(&mpc_timer); |
1418 | } | 1417 | } |
1419 | 1418 | ||
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 4b90033f35a8..15cd2139381e 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c | |||
@@ -488,9 +488,9 @@ static void batadv_tp_reset_sender_timer(struct batadv_tp_vars *tp_vars) | |||
488 | * Switch to Slow Start, set the ss_threshold to half of the current cwnd and | 488 | * Switch to Slow Start, set the ss_threshold to half of the current cwnd and |
489 | * reset the cwnd to 3*MSS | 489 | * reset the cwnd to 3*MSS |
490 | */ | 490 | */ |
491 | static void batadv_tp_sender_timeout(unsigned long arg) | 491 | static void batadv_tp_sender_timeout(struct timer_list *t) |
492 | { | 492 | { |
493 | struct batadv_tp_vars *tp_vars = (struct batadv_tp_vars *)arg; | 493 | struct batadv_tp_vars *tp_vars = from_timer(tp_vars, t, timer); |
494 | struct batadv_priv *bat_priv = tp_vars->bat_priv; | 494 | struct batadv_priv *bat_priv = tp_vars->bat_priv; |
495 | 495 | ||
496 | if (atomic_read(&tp_vars->sending) == 0) | 496 | if (atomic_read(&tp_vars->sending) == 0) |
@@ -1020,8 +1020,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst, | |||
1020 | atomic64_set(&tp_vars->tot_sent, 0); | 1020 | atomic64_set(&tp_vars->tot_sent, 0); |
1021 | 1021 | ||
1022 | kref_get(&tp_vars->refcount); | 1022 | kref_get(&tp_vars->refcount); |
1023 | setup_timer(&tp_vars->timer, batadv_tp_sender_timeout, | 1023 | timer_setup(&tp_vars->timer, batadv_tp_sender_timeout, 0); |
1024 | (unsigned long)tp_vars); | ||
1025 | 1024 | ||
1026 | tp_vars->bat_priv = bat_priv; | 1025 | tp_vars->bat_priv = bat_priv; |
1027 | tp_vars->start_time = jiffies; | 1026 | tp_vars->start_time = jiffies; |
@@ -1109,9 +1108,9 @@ static void batadv_tp_reset_receiver_timer(struct batadv_tp_vars *tp_vars) | |||
1109 | * reached without received ack | 1108 | * reached without received ack |
1110 | * @arg: address of the related tp_vars | 1109 | * @arg: address of the related tp_vars |
1111 | */ | 1110 | */ |
1112 | static void batadv_tp_receiver_shutdown(unsigned long arg) | 1111 | static void batadv_tp_receiver_shutdown(struct timer_list *t) |
1113 | { | 1112 | { |
1114 | struct batadv_tp_vars *tp_vars = (struct batadv_tp_vars *)arg; | 1113 | struct batadv_tp_vars *tp_vars = from_timer(tp_vars, t, timer); |
1115 | struct batadv_tp_unacked *un, *safe; | 1114 | struct batadv_tp_unacked *un, *safe; |
1116 | struct batadv_priv *bat_priv; | 1115 | struct batadv_priv *bat_priv; |
1117 | 1116 | ||
@@ -1373,8 +1372,7 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, | |||
1373 | hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list); | 1372 | hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list); |
1374 | 1373 | ||
1375 | kref_get(&tp_vars->refcount); | 1374 | kref_get(&tp_vars->refcount); |
1376 | setup_timer(&tp_vars->timer, batadv_tp_receiver_shutdown, | 1375 | timer_setup(&tp_vars->timer, batadv_tp_receiver_shutdown, 0); |
1377 | (unsigned long)tp_vars); | ||
1378 | 1376 | ||
1379 | batadv_tp_reset_receiver_timer(tp_vars); | 1377 | batadv_tp_reset_receiver_timer(tp_vars); |
1380 | 1378 | ||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 8112893037bd..f2cec70d520c 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -398,9 +398,9 @@ static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum, | |||
398 | } | 398 | } |
399 | } | 399 | } |
400 | 400 | ||
401 | static void hidp_idle_timeout(unsigned long arg) | 401 | static void hidp_idle_timeout(struct timer_list *t) |
402 | { | 402 | { |
403 | struct hidp_session *session = (struct hidp_session *) arg; | 403 | struct hidp_session *session = from_timer(session, t, timer); |
404 | 404 | ||
405 | /* The HIDP user-space API only contains calls to add and remove | 405 | /* The HIDP user-space API only contains calls to add and remove |
406 | * devices. There is no way to forward events of any kind. Therefore, | 406 | * devices. There is no way to forward events of any kind. Therefore, |
@@ -944,8 +944,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr, | |||
944 | 944 | ||
945 | /* device management */ | 945 | /* device management */ |
946 | INIT_WORK(&session->dev_init, hidp_session_dev_work); | 946 | INIT_WORK(&session->dev_init, hidp_session_dev_work); |
947 | setup_timer(&session->timer, hidp_idle_timeout, | 947 | timer_setup(&session->timer, hidp_idle_timeout, 0); |
948 | (unsigned long)session); | ||
949 | 948 | ||
950 | /* session data */ | 949 | /* session data */ |
951 | mutex_init(&session->report_mutex); | 950 | mutex_init(&session->report_mutex); |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 4a0b41d75c84..b98225d65e87 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -233,9 +233,9 @@ static int rfcomm_check_security(struct rfcomm_dlc *d) | |||
233 | d->out); | 233 | d->out); |
234 | } | 234 | } |
235 | 235 | ||
236 | static void rfcomm_session_timeout(unsigned long arg) | 236 | static void rfcomm_session_timeout(struct timer_list *t) |
237 | { | 237 | { |
238 | struct rfcomm_session *s = (void *) arg; | 238 | struct rfcomm_session *s = from_timer(s, t, timer); |
239 | 239 | ||
240 | BT_DBG("session %p state %ld", s, s->state); | 240 | BT_DBG("session %p state %ld", s, s->state); |
241 | 241 | ||
@@ -258,9 +258,9 @@ static void rfcomm_session_clear_timer(struct rfcomm_session *s) | |||
258 | } | 258 | } |
259 | 259 | ||
260 | /* ---- RFCOMM DLCs ---- */ | 260 | /* ---- RFCOMM DLCs ---- */ |
261 | static void rfcomm_dlc_timeout(unsigned long arg) | 261 | static void rfcomm_dlc_timeout(struct timer_list *t) |
262 | { | 262 | { |
263 | struct rfcomm_dlc *d = (void *) arg; | 263 | struct rfcomm_dlc *d = from_timer(d, t, timer); |
264 | 264 | ||
265 | BT_DBG("dlc %p state %ld", d, d->state); | 265 | BT_DBG("dlc %p state %ld", d, d->state); |
266 | 266 | ||
@@ -307,7 +307,7 @@ struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio) | |||
307 | if (!d) | 307 | if (!d) |
308 | return NULL; | 308 | return NULL; |
309 | 309 | ||
310 | setup_timer(&d->timer, rfcomm_dlc_timeout, (unsigned long)d); | 310 | timer_setup(&d->timer, rfcomm_dlc_timeout, 0); |
311 | 311 | ||
312 | skb_queue_head_init(&d->tx_queue); | 312 | skb_queue_head_init(&d->tx_queue); |
313 | mutex_init(&d->lock); | 313 | mutex_init(&d->lock); |
@@ -650,7 +650,7 @@ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) | |||
650 | 650 | ||
651 | BT_DBG("session %p sock %p", s, sock); | 651 | BT_DBG("session %p sock %p", s, sock); |
652 | 652 | ||
653 | setup_timer(&s->timer, rfcomm_session_timeout, (unsigned long) s); | 653 | timer_setup(&s->timer, rfcomm_session_timeout, 0); |
654 | 654 | ||
655 | INIT_LIST_HEAD(&s->dlcs); | 655 | INIT_LIST_HEAD(&s->dlcs); |
656 | s->state = state; | 656 | s->state = state; |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 795e920a3281..08df57665e1f 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -73,9 +73,9 @@ struct sco_pinfo { | |||
73 | #define SCO_CONN_TIMEOUT (HZ * 40) | 73 | #define SCO_CONN_TIMEOUT (HZ * 40) |
74 | #define SCO_DISCONN_TIMEOUT (HZ * 2) | 74 | #define SCO_DISCONN_TIMEOUT (HZ * 2) |
75 | 75 | ||
76 | static void sco_sock_timeout(unsigned long arg) | 76 | static void sco_sock_timeout(struct timer_list *t) |
77 | { | 77 | { |
78 | struct sock *sk = (struct sock *)arg; | 78 | struct sock *sk = from_timer(sk, t, sk_timer); |
79 | 79 | ||
80 | BT_DBG("sock %p state %d", sk, sk->sk_state); | 80 | BT_DBG("sock %p state %d", sk, sk->sk_state); |
81 | 81 | ||
@@ -487,7 +487,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, | |||
487 | 487 | ||
488 | sco_pi(sk)->setting = BT_VOICE_CVSD_16BIT; | 488 | sco_pi(sk)->setting = BT_VOICE_CVSD_16BIT; |
489 | 489 | ||
490 | setup_timer(&sk->sk_timer, sco_sock_timeout, (unsigned long)sk); | 490 | timer_setup(&sk->sk_timer, sco_sock_timeout, 0); |
491 | 491 | ||
492 | bt_sock_link(&sco_sk_list, sk); | 492 | bt_sock_link(&sco_sk_list, sk); |
493 | return sk; | 493 | return sk; |
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/core/drop_monitor.c b/net/core/drop_monitor.c index 70ccda233bd1..c7785efeea57 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -144,9 +144,9 @@ static void send_dm_alert(struct work_struct *work) | |||
144 | * in the event that more drops will arrive during the | 144 | * in the event that more drops will arrive during the |
145 | * hysteresis period. | 145 | * hysteresis period. |
146 | */ | 146 | */ |
147 | static void sched_send_work(unsigned long _data) | 147 | static void sched_send_work(struct timer_list *t) |
148 | { | 148 | { |
149 | struct per_cpu_dm_data *data = (struct per_cpu_dm_data *)_data; | 149 | struct per_cpu_dm_data *data = from_timer(data, t, send_timer); |
150 | 150 | ||
151 | schedule_work(&data->dm_alert_work); | 151 | schedule_work(&data->dm_alert_work); |
152 | } | 152 | } |
@@ -412,8 +412,7 @@ static int __init init_net_drop_monitor(void) | |||
412 | for_each_possible_cpu(cpu) { | 412 | for_each_possible_cpu(cpu) { |
413 | data = &per_cpu(dm_cpu_data, cpu); | 413 | data = &per_cpu(dm_cpu_data, cpu); |
414 | INIT_WORK(&data->dm_alert_work, send_dm_alert); | 414 | INIT_WORK(&data->dm_alert_work, send_dm_alert); |
415 | setup_timer(&data->send_timer, sched_send_work, | 415 | timer_setup(&data->send_timer, sched_send_work, 0); |
416 | (unsigned long)data); | ||
417 | spin_lock_init(&data->lock); | 416 | spin_lock_init(&data->lock); |
418 | reset_per_cpu_data(data); | 417 | reset_per_cpu_data(data); |
419 | } | 418 | } |
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 7c1ffd6f9501..9834cfa21b21 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -76,9 +76,9 @@ static void est_fetch_counters(struct net_rate_estimator *e, | |||
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | static void est_timer(unsigned long arg) | 79 | static void est_timer(struct timer_list *t) |
80 | { | 80 | { |
81 | struct net_rate_estimator *est = (struct net_rate_estimator *)arg; | 81 | struct net_rate_estimator *est = from_timer(est, t, timer); |
82 | struct gnet_stats_basic_packed b; | 82 | struct gnet_stats_basic_packed b; |
83 | u64 rate, brate; | 83 | u64 rate, brate; |
84 | 84 | ||
@@ -170,7 +170,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, | |||
170 | } | 170 | } |
171 | 171 | ||
172 | est->next_jiffies = jiffies + ((HZ/4) << intvl_log); | 172 | est->next_jiffies = jiffies + ((HZ/4) << intvl_log); |
173 | setup_timer(&est->timer, est_timer, (unsigned long)est); | 173 | timer_setup(&est->timer, est_timer, 0); |
174 | mod_timer(&est->timer, est->next_jiffies); | 174 | mod_timer(&est->timer, est->next_jiffies); |
175 | 175 | ||
176 | rcu_assign_pointer(*rate_est, est); | 176 | rcu_assign_pointer(*rate_est, est); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 6ea3a1a7f36a..d1f5fe986edd 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -51,7 +51,7 @@ do { \ | |||
51 | 51 | ||
52 | #define PNEIGH_HASHMASK 0xF | 52 | #define PNEIGH_HASHMASK 0xF |
53 | 53 | ||
54 | static void neigh_timer_handler(unsigned long arg); | 54 | static void neigh_timer_handler(struct timer_list *t); |
55 | static void __neigh_notify(struct neighbour *n, int type, int flags, | 55 | static void __neigh_notify(struct neighbour *n, int type, int flags, |
56 | u32 pid); | 56 | u32 pid); |
57 | static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid); | 57 | static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid); |
@@ -331,7 +331,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device | |||
331 | n->output = neigh_blackhole; | 331 | n->output = neigh_blackhole; |
332 | seqlock_init(&n->hh.hh_lock); | 332 | seqlock_init(&n->hh.hh_lock); |
333 | n->parms = neigh_parms_clone(&tbl->parms); | 333 | n->parms = neigh_parms_clone(&tbl->parms); |
334 | setup_timer(&n->timer, neigh_timer_handler, (unsigned long)n); | 334 | timer_setup(&n->timer, neigh_timer_handler, 0); |
335 | 335 | ||
336 | NEIGH_CACHE_STAT_INC(tbl, allocs); | 336 | NEIGH_CACHE_STAT_INC(tbl, allocs); |
337 | n->tbl = tbl; | 337 | n->tbl = tbl; |
@@ -903,10 +903,10 @@ static void neigh_probe(struct neighbour *neigh) | |||
903 | 903 | ||
904 | /* Called when a timer expires for a neighbour entry. */ | 904 | /* Called when a timer expires for a neighbour entry. */ |
905 | 905 | ||
906 | static void neigh_timer_handler(unsigned long arg) | 906 | static void neigh_timer_handler(struct timer_list *t) |
907 | { | 907 | { |
908 | unsigned long now, next; | 908 | unsigned long now, next; |
909 | struct neighbour *neigh = (struct neighbour *)arg; | 909 | struct neighbour *neigh = from_timer(neigh, t, timer); |
910 | unsigned int state; | 910 | unsigned int state; |
911 | int notify = 0; | 911 | int notify = 0; |
912 | 912 | ||
@@ -1391,9 +1391,9 @@ int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb) | |||
1391 | } | 1391 | } |
1392 | EXPORT_SYMBOL(neigh_direct_output); | 1392 | EXPORT_SYMBOL(neigh_direct_output); |
1393 | 1393 | ||
1394 | static void neigh_proxy_process(unsigned long arg) | 1394 | static void neigh_proxy_process(struct timer_list *t) |
1395 | { | 1395 | { |
1396 | struct neigh_table *tbl = (struct neigh_table *)arg; | 1396 | struct neigh_table *tbl = from_timer(tbl, t, proxy_timer); |
1397 | long sched_next = 0; | 1397 | long sched_next = 0; |
1398 | unsigned long now = jiffies; | 1398 | unsigned long now = jiffies; |
1399 | struct sk_buff *skb, *n; | 1399 | struct sk_buff *skb, *n; |
@@ -1573,7 +1573,7 @@ void neigh_table_init(int index, struct neigh_table *tbl) | |||
1573 | INIT_DEFERRABLE_WORK(&tbl->gc_work, neigh_periodic_work); | 1573 | INIT_DEFERRABLE_WORK(&tbl->gc_work, neigh_periodic_work); |
1574 | queue_delayed_work(system_power_efficient_wq, &tbl->gc_work, | 1574 | queue_delayed_work(system_power_efficient_wq, &tbl->gc_work, |
1575 | tbl->parms.reachable_time); | 1575 | tbl->parms.reachable_time); |
1576 | setup_timer(&tbl->proxy_timer, neigh_proxy_process, (unsigned long)tbl); | 1576 | timer_setup(&tbl->proxy_timer, neigh_proxy_process, 0); |
1577 | skb_queue_head_init_class(&tbl->proxy_queue, | 1577 | skb_queue_head_init_class(&tbl->proxy_queue, |
1578 | &neigh_table_proxy_queue_class); | 1578 | &neigh_table_proxy_queue_class); |
1579 | 1579 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index b36dceab0dc1..324cb9f2f551 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -125,7 +125,7 @@ static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, | |||
125 | struct sk_buff *skb, | 125 | struct sk_buff *skb, |
126 | const void *daddr); | 126 | const void *daddr); |
127 | static int dn_route_input(struct sk_buff *); | 127 | static int dn_route_input(struct sk_buff *); |
128 | static void dn_run_flush(unsigned long dummy); | 128 | static void dn_run_flush(struct timer_list *unused); |
129 | 129 | ||
130 | static struct dn_rt_hash_bucket *dn_rt_hash_table; | 130 | static struct dn_rt_hash_bucket *dn_rt_hash_table; |
131 | static unsigned int dn_rt_hash_mask; | 131 | static unsigned int dn_rt_hash_mask; |
@@ -183,7 +183,7 @@ static __inline__ unsigned int dn_hash(__le16 src, __le16 dst) | |||
183 | return dn_rt_hash_mask & (unsigned int)tmp; | 183 | return dn_rt_hash_mask & (unsigned int)tmp; |
184 | } | 184 | } |
185 | 185 | ||
186 | static void dn_dst_check_expire(unsigned long dummy) | 186 | static void dn_dst_check_expire(struct timer_list *unused) |
187 | { | 187 | { |
188 | int i; | 188 | int i; |
189 | struct dn_route *rt; | 189 | struct dn_route *rt; |
@@ -357,7 +357,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_rou | |||
357 | return 0; | 357 | return 0; |
358 | } | 358 | } |
359 | 359 | ||
360 | static void dn_run_flush(unsigned long dummy) | 360 | static void dn_run_flush(struct timer_list *unused) |
361 | { | 361 | { |
362 | int i; | 362 | int i; |
363 | struct dn_route *rt, *next; | 363 | struct dn_route *rt, *next; |
@@ -1875,7 +1875,7 @@ void __init dn_route_init(void) | |||
1875 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, | 1875 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, |
1876 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | 1876 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1877 | dst_entries_init(&dn_dst_ops); | 1877 | dst_entries_init(&dn_dst_ops); |
1878 | setup_timer(&dn_route_timer, dn_dst_check_expire, 0); | 1878 | timer_setup(&dn_route_timer, dn_dst_check_expire, 0); |
1879 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; | 1879 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; |
1880 | add_timer(&dn_route_timer); | 1880 | add_timer(&dn_route_timer); |
1881 | 1881 | ||
diff --git a/net/decnet/dn_timer.c b/net/decnet/dn_timer.c index f430daed24a0..aa4155875ca8 100644 --- a/net/decnet/dn_timer.c +++ b/net/decnet/dn_timer.c | |||
@@ -34,11 +34,11 @@ | |||
34 | 34 | ||
35 | #define SLOW_INTERVAL (HZ/2) | 35 | #define SLOW_INTERVAL (HZ/2) |
36 | 36 | ||
37 | static void dn_slow_timer(unsigned long arg); | 37 | static void dn_slow_timer(struct timer_list *t); |
38 | 38 | ||
39 | void dn_start_slow_timer(struct sock *sk) | 39 | void dn_start_slow_timer(struct sock *sk) |
40 | { | 40 | { |
41 | setup_timer(&sk->sk_timer, dn_slow_timer, (unsigned long)sk); | 41 | timer_setup(&sk->sk_timer, dn_slow_timer, 0); |
42 | sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL); | 42 | sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL); |
43 | } | 43 | } |
44 | 44 | ||
@@ -47,9 +47,9 @@ void dn_stop_slow_timer(struct sock *sk) | |||
47 | sk_stop_timer(sk, &sk->sk_timer); | 47 | sk_stop_timer(sk, &sk->sk_timer); |
48 | } | 48 | } |
49 | 49 | ||
50 | static void dn_slow_timer(unsigned long arg) | 50 | static void dn_slow_timer(struct timer_list *t) |
51 | { | 51 | { |
52 | struct sock *sk = (struct sock *)arg; | 52 | struct sock *sk = from_timer(sk, t, sk_timer); |
53 | struct dn_scp *scp = DN_SK(sk); | 53 | struct dn_scp *scp = DN_SK(sk); |
54 | 54 | ||
55 | bh_lock_sock(sk); | 55 | bh_lock_sock(sk); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index ab183af0b5b6..d1f8f302dbf3 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -752,18 +752,18 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, | |||
752 | return ip_local_out(net, skb->sk, skb); | 752 | return ip_local_out(net, skb->sk, skb); |
753 | } | 753 | } |
754 | 754 | ||
755 | static void igmp_gq_timer_expire(unsigned long data) | 755 | static void igmp_gq_timer_expire(struct timer_list *t) |
756 | { | 756 | { |
757 | struct in_device *in_dev = (struct in_device *)data; | 757 | struct in_device *in_dev = from_timer(in_dev, t, mr_gq_timer); |
758 | 758 | ||
759 | in_dev->mr_gq_running = 0; | 759 | in_dev->mr_gq_running = 0; |
760 | igmpv3_send_report(in_dev, NULL); | 760 | igmpv3_send_report(in_dev, NULL); |
761 | in_dev_put(in_dev); | 761 | in_dev_put(in_dev); |
762 | } | 762 | } |
763 | 763 | ||
764 | static void igmp_ifc_timer_expire(unsigned long data) | 764 | static void igmp_ifc_timer_expire(struct timer_list *t) |
765 | { | 765 | { |
766 | struct in_device *in_dev = (struct in_device *)data; | 766 | struct in_device *in_dev = from_timer(in_dev, t, mr_ifc_timer); |
767 | 767 | ||
768 | igmpv3_send_cr(in_dev); | 768 | igmpv3_send_cr(in_dev); |
769 | if (in_dev->mr_ifc_count) { | 769 | if (in_dev->mr_ifc_count) { |
@@ -784,9 +784,9 @@ static void igmp_ifc_event(struct in_device *in_dev) | |||
784 | } | 784 | } |
785 | 785 | ||
786 | 786 | ||
787 | static void igmp_timer_expire(unsigned long data) | 787 | static void igmp_timer_expire(struct timer_list *t) |
788 | { | 788 | { |
789 | struct ip_mc_list *im = (struct ip_mc_list *)data; | 789 | struct ip_mc_list *im = from_timer(im, t, timer); |
790 | struct in_device *in_dev = im->interface; | 790 | struct in_device *in_dev = im->interface; |
791 | 791 | ||
792 | spin_lock(&im->lock); | 792 | spin_lock(&im->lock); |
@@ -1385,7 +1385,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1385 | refcount_set(&im->refcnt, 1); | 1385 | refcount_set(&im->refcnt, 1); |
1386 | spin_lock_init(&im->lock); | 1386 | spin_lock_init(&im->lock); |
1387 | #ifdef CONFIG_IP_MULTICAST | 1387 | #ifdef CONFIG_IP_MULTICAST |
1388 | setup_timer(&im->timer, igmp_timer_expire, (unsigned long)im); | 1388 | timer_setup(&im->timer, igmp_timer_expire, 0); |
1389 | im->unsolicit_count = net->ipv4.sysctl_igmp_qrv; | 1389 | im->unsolicit_count = net->ipv4.sysctl_igmp_qrv; |
1390 | #endif | 1390 | #endif |
1391 | 1391 | ||
@@ -1695,10 +1695,8 @@ void ip_mc_init_dev(struct in_device *in_dev) | |||
1695 | ASSERT_RTNL(); | 1695 | ASSERT_RTNL(); |
1696 | 1696 | ||
1697 | #ifdef CONFIG_IP_MULTICAST | 1697 | #ifdef CONFIG_IP_MULTICAST |
1698 | setup_timer(&in_dev->mr_gq_timer, igmp_gq_timer_expire, | 1698 | timer_setup(&in_dev->mr_gq_timer, igmp_gq_timer_expire, 0); |
1699 | (unsigned long)in_dev); | 1699 | timer_setup(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, 0); |
1700 | setup_timer(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, | ||
1701 | (unsigned long)in_dev); | ||
1702 | in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv; | 1700 | in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv; |
1703 | #endif | 1701 | #endif |
1704 | 1702 | ||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 40a43ad294cb..fd5f19c988e4 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -112,7 +112,7 @@ static void mroute_netlink_event(struct mr_table *mrt, struct mfc_cache *mfc, | |||
112 | int cmd); | 112 | int cmd); |
113 | static void igmpmsg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt); | 113 | static void igmpmsg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt); |
114 | static void mroute_clean_tables(struct mr_table *mrt, bool all); | 114 | static void mroute_clean_tables(struct mr_table *mrt, bool all); |
115 | static void ipmr_expire_process(unsigned long arg); | 115 | static void ipmr_expire_process(struct timer_list *t); |
116 | 116 | ||
117 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 117 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
118 | #define ipmr_for_each_table(mrt, net) \ | 118 | #define ipmr_for_each_table(mrt, net) \ |
@@ -375,8 +375,7 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id) | |||
375 | INIT_LIST_HEAD(&mrt->mfc_cache_list); | 375 | INIT_LIST_HEAD(&mrt->mfc_cache_list); |
376 | INIT_LIST_HEAD(&mrt->mfc_unres_queue); | 376 | INIT_LIST_HEAD(&mrt->mfc_unres_queue); |
377 | 377 | ||
378 | setup_timer(&mrt->ipmr_expire_timer, ipmr_expire_process, | 378 | timer_setup(&mrt->ipmr_expire_timer, ipmr_expire_process, 0); |
379 | (unsigned long)mrt); | ||
380 | 379 | ||
381 | mrt->mroute_reg_vif_num = -1; | 380 | mrt->mroute_reg_vif_num = -1; |
382 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 381 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
@@ -804,9 +803,9 @@ static void ipmr_destroy_unres(struct mr_table *mrt, struct mfc_cache *c) | |||
804 | } | 803 | } |
805 | 804 | ||
806 | /* Timer process for the unresolved queue. */ | 805 | /* Timer process for the unresolved queue. */ |
807 | static void ipmr_expire_process(unsigned long arg) | 806 | static void ipmr_expire_process(struct timer_list *t) |
808 | { | 807 | { |
809 | struct mr_table *mrt = (struct mr_table *)arg; | 808 | struct mr_table *mrt = from_timer(mrt, t, ipmr_expire_timer); |
810 | unsigned long now; | 809 | unsigned long now; |
811 | unsigned long expires; | 810 | unsigned long expires; |
812 | struct mfc_cache *c, *next; | 811 | struct mfc_cache *c, *next; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a0ae1c9d37df..f49bd7897e95 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -188,7 +188,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp); | |||
188 | static void addrconf_dad_work(struct work_struct *w); | 188 | static void addrconf_dad_work(struct work_struct *w); |
189 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id); | 189 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id); |
190 | static void addrconf_dad_run(struct inet6_dev *idev); | 190 | static void addrconf_dad_run(struct inet6_dev *idev); |
191 | static void addrconf_rs_timer(unsigned long data); | 191 | static void addrconf_rs_timer(struct timer_list *t); |
192 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 192 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
193 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 193 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
194 | 194 | ||
@@ -388,8 +388,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) | |||
388 | rwlock_init(&ndev->lock); | 388 | rwlock_init(&ndev->lock); |
389 | ndev->dev = dev; | 389 | ndev->dev = dev; |
390 | INIT_LIST_HEAD(&ndev->addr_list); | 390 | INIT_LIST_HEAD(&ndev->addr_list); |
391 | setup_timer(&ndev->rs_timer, addrconf_rs_timer, | 391 | timer_setup(&ndev->rs_timer, addrconf_rs_timer, 0); |
392 | (unsigned long)ndev); | ||
393 | memcpy(&ndev->cnf, dev_net(dev)->ipv6.devconf_dflt, sizeof(ndev->cnf)); | 392 | memcpy(&ndev->cnf, dev_net(dev)->ipv6.devconf_dflt, sizeof(ndev->cnf)); |
394 | 393 | ||
395 | if (ndev->cnf.stable_secret.initialized) | 394 | if (ndev->cnf.stable_secret.initialized) |
@@ -3741,9 +3740,9 @@ restart: | |||
3741 | return 0; | 3740 | return 0; |
3742 | } | 3741 | } |
3743 | 3742 | ||
3744 | static void addrconf_rs_timer(unsigned long data) | 3743 | static void addrconf_rs_timer(struct timer_list *t) |
3745 | { | 3744 | { |
3746 | struct inet6_dev *idev = (struct inet6_dev *)data; | 3745 | struct inet6_dev *idev = from_timer(idev, t, rs_timer); |
3747 | struct net_device *dev = idev->dev; | 3746 | struct net_device *dev = idev->dev; |
3748 | struct in6_addr lladdr; | 3747 | struct in6_addr lladdr; |
3749 | 3748 | ||
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 2e2804f5823e..f5285f4e1d08 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -70,7 +70,7 @@ static int fib6_walk_continue(struct fib6_walker *w); | |||
70 | * result of redirects, path MTU changes, etc. | 70 | * result of redirects, path MTU changes, etc. |
71 | */ | 71 | */ |
72 | 72 | ||
73 | static void fib6_gc_timer_cb(unsigned long arg); | 73 | static void fib6_gc_timer_cb(struct timer_list *t); |
74 | 74 | ||
75 | #define FOR_WALKERS(net, w) \ | 75 | #define FOR_WALKERS(net, w) \ |
76 | list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh) | 76 | list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh) |
@@ -2026,9 +2026,11 @@ void fib6_run_gc(unsigned long expires, struct net *net, bool force) | |||
2026 | spin_unlock_bh(&net->ipv6.fib6_gc_lock); | 2026 | spin_unlock_bh(&net->ipv6.fib6_gc_lock); |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | static void fib6_gc_timer_cb(unsigned long arg) | 2029 | static void fib6_gc_timer_cb(struct timer_list *t) |
2030 | { | 2030 | { |
2031 | fib6_run_gc(0, (struct net *)arg, true); | 2031 | struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer); |
2032 | |||
2033 | fib6_run_gc(0, arg, true); | ||
2032 | } | 2034 | } |
2033 | 2035 | ||
2034 | static int __net_init fib6_net_init(struct net *net) | 2036 | static int __net_init fib6_net_init(struct net *net) |
@@ -2043,7 +2045,7 @@ static int __net_init fib6_net_init(struct net *net) | |||
2043 | spin_lock_init(&net->ipv6.fib6_gc_lock); | 2045 | spin_lock_init(&net->ipv6.fib6_gc_lock); |
2044 | rwlock_init(&net->ipv6.fib6_walker_lock); | 2046 | rwlock_init(&net->ipv6.fib6_walker_lock); |
2045 | INIT_LIST_HEAD(&net->ipv6.fib6_walkers); | 2047 | INIT_LIST_HEAD(&net->ipv6.fib6_walkers); |
2046 | setup_timer(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, (unsigned long)net); | 2048 | timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); |
2047 | 2049 | ||
2048 | net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); | 2050 | net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); |
2049 | if (!net->ipv6.rt6_stats) | 2051 | if (!net->ipv6.rt6_stats) |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 9f2e73c71768..7f59c8fabeeb 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -46,7 +46,7 @@ | |||
46 | static atomic_t fl_size = ATOMIC_INIT(0); | 46 | static atomic_t fl_size = ATOMIC_INIT(0); |
47 | static struct ip6_flowlabel __rcu *fl_ht[FL_HASH_MASK+1]; | 47 | static struct ip6_flowlabel __rcu *fl_ht[FL_HASH_MASK+1]; |
48 | 48 | ||
49 | static void ip6_fl_gc(unsigned long dummy); | 49 | static void ip6_fl_gc(struct timer_list *unused); |
50 | static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc); | 50 | static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc); |
51 | 51 | ||
52 | /* FL hash table lock: it protects only of GC */ | 52 | /* FL hash table lock: it protects only of GC */ |
@@ -127,7 +127,7 @@ static void fl_release(struct ip6_flowlabel *fl) | |||
127 | spin_unlock_bh(&ip6_fl_lock); | 127 | spin_unlock_bh(&ip6_fl_lock); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void ip6_fl_gc(unsigned long dummy) | 130 | static void ip6_fl_gc(struct timer_list *unused) |
131 | { | 131 | { |
132 | int i; | 132 | int i; |
133 | unsigned long now = jiffies; | 133 | unsigned long now = jiffies; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 9c24b85949c1..a2e1a864eb46 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -120,7 +120,7 @@ static void mrt6msg_netlink_event(struct mr6_table *mrt, struct sk_buff *pkt); | |||
120 | static int ip6mr_rtm_dumproute(struct sk_buff *skb, | 120 | static int ip6mr_rtm_dumproute(struct sk_buff *skb, |
121 | struct netlink_callback *cb); | 121 | struct netlink_callback *cb); |
122 | static void mroute_clean_tables(struct mr6_table *mrt, bool all); | 122 | static void mroute_clean_tables(struct mr6_table *mrt, bool all); |
123 | static void ipmr_expire_process(unsigned long arg); | 123 | static void ipmr_expire_process(struct timer_list *t); |
124 | 124 | ||
125 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES | 125 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES |
126 | #define ip6mr_for_each_table(mrt, net) \ | 126 | #define ip6mr_for_each_table(mrt, net) \ |
@@ -320,8 +320,7 @@ static struct mr6_table *ip6mr_new_table(struct net *net, u32 id) | |||
320 | 320 | ||
321 | INIT_LIST_HEAD(&mrt->mfc6_unres_queue); | 321 | INIT_LIST_HEAD(&mrt->mfc6_unres_queue); |
322 | 322 | ||
323 | setup_timer(&mrt->ipmr_expire_timer, ipmr_expire_process, | 323 | timer_setup(&mrt->ipmr_expire_timer, ipmr_expire_process, 0); |
324 | (unsigned long)mrt); | ||
325 | 324 | ||
326 | #ifdef CONFIG_IPV6_PIMSM_V2 | 325 | #ifdef CONFIG_IPV6_PIMSM_V2 |
327 | mrt->mroute_reg_vif_num = -1; | 326 | mrt->mroute_reg_vif_num = -1; |
@@ -888,9 +887,9 @@ static void ipmr_do_expire_process(struct mr6_table *mrt) | |||
888 | mod_timer(&mrt->ipmr_expire_timer, jiffies + expires); | 887 | mod_timer(&mrt->ipmr_expire_timer, jiffies + expires); |
889 | } | 888 | } |
890 | 889 | ||
891 | static void ipmr_expire_process(unsigned long arg) | 890 | static void ipmr_expire_process(struct timer_list *t) |
892 | { | 891 | { |
893 | struct mr6_table *mrt = (struct mr6_table *)arg; | 892 | struct mr6_table *mrt = from_timer(mrt, t, ipmr_expire_timer); |
894 | 893 | ||
895 | if (!spin_trylock(&mfc_unres_lock)) { | 894 | if (!spin_trylock(&mfc_unres_lock)) { |
896 | mod_timer(&mrt->ipmr_expire_timer, jiffies + 1); | 895 | mod_timer(&mrt->ipmr_expire_timer, jiffies + 1); |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 12b7c27ce5ce..fc6d7d143f2c 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -75,10 +75,10 @@ static struct in6_addr mld2_all_mcr = MLD2_ALL_MCR_INIT; | |||
75 | 75 | ||
76 | static void igmp6_join_group(struct ifmcaddr6 *ma); | 76 | static void igmp6_join_group(struct ifmcaddr6 *ma); |
77 | static void igmp6_leave_group(struct ifmcaddr6 *ma); | 77 | static void igmp6_leave_group(struct ifmcaddr6 *ma); |
78 | static void igmp6_timer_handler(unsigned long data); | 78 | static void igmp6_timer_handler(struct timer_list *t); |
79 | 79 | ||
80 | static void mld_gq_timer_expire(unsigned long data); | 80 | static void mld_gq_timer_expire(struct timer_list *t); |
81 | static void mld_ifc_timer_expire(unsigned long data); | 81 | static void mld_ifc_timer_expire(struct timer_list *t); |
82 | static void mld_ifc_event(struct inet6_dev *idev); | 82 | static void mld_ifc_event(struct inet6_dev *idev); |
83 | static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); | 83 | static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); |
84 | static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); | 84 | static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); |
@@ -839,7 +839,7 @@ static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev, | |||
839 | if (!mc) | 839 | if (!mc) |
840 | return NULL; | 840 | return NULL; |
841 | 841 | ||
842 | setup_timer(&mc->mca_timer, igmp6_timer_handler, (unsigned long)mc); | 842 | timer_setup(&mc->mca_timer, igmp6_timer_handler, 0); |
843 | 843 | ||
844 | mc->mca_addr = *addr; | 844 | mc->mca_addr = *addr; |
845 | mc->idev = idev; /* reference taken by caller */ | 845 | mc->idev = idev; /* reference taken by caller */ |
@@ -2083,9 +2083,9 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev) | |||
2083 | } | 2083 | } |
2084 | } | 2084 | } |
2085 | 2085 | ||
2086 | static void mld_dad_timer_expire(unsigned long data) | 2086 | static void mld_dad_timer_expire(struct timer_list *t) |
2087 | { | 2087 | { |
2088 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2088 | struct inet6_dev *idev = from_timer(idev, t, mc_dad_timer); |
2089 | 2089 | ||
2090 | mld_send_initial_cr(idev); | 2090 | mld_send_initial_cr(idev); |
2091 | if (idev->mc_dad_count) { | 2091 | if (idev->mc_dad_count) { |
@@ -2432,18 +2432,18 @@ static void igmp6_leave_group(struct ifmcaddr6 *ma) | |||
2432 | } | 2432 | } |
2433 | } | 2433 | } |
2434 | 2434 | ||
2435 | static void mld_gq_timer_expire(unsigned long data) | 2435 | static void mld_gq_timer_expire(struct timer_list *t) |
2436 | { | 2436 | { |
2437 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2437 | struct inet6_dev *idev = from_timer(idev, t, mc_gq_timer); |
2438 | 2438 | ||
2439 | idev->mc_gq_running = 0; | 2439 | idev->mc_gq_running = 0; |
2440 | mld_send_report(idev, NULL); | 2440 | mld_send_report(idev, NULL); |
2441 | in6_dev_put(idev); | 2441 | in6_dev_put(idev); |
2442 | } | 2442 | } |
2443 | 2443 | ||
2444 | static void mld_ifc_timer_expire(unsigned long data) | 2444 | static void mld_ifc_timer_expire(struct timer_list *t) |
2445 | { | 2445 | { |
2446 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2446 | struct inet6_dev *idev = from_timer(idev, t, mc_ifc_timer); |
2447 | 2447 | ||
2448 | mld_send_cr(idev); | 2448 | mld_send_cr(idev); |
2449 | if (idev->mc_ifc_count) { | 2449 | if (idev->mc_ifc_count) { |
@@ -2462,9 +2462,9 @@ static void mld_ifc_event(struct inet6_dev *idev) | |||
2462 | mld_ifc_start_timer(idev, 1); | 2462 | mld_ifc_start_timer(idev, 1); |
2463 | } | 2463 | } |
2464 | 2464 | ||
2465 | static void igmp6_timer_handler(unsigned long data) | 2465 | static void igmp6_timer_handler(struct timer_list *t) |
2466 | { | 2466 | { |
2467 | struct ifmcaddr6 *ma = (struct ifmcaddr6 *) data; | 2467 | struct ifmcaddr6 *ma = from_timer(ma, t, mca_timer); |
2468 | 2468 | ||
2469 | if (mld_in_v1_mode(ma->idev)) | 2469 | if (mld_in_v1_mode(ma->idev)) |
2470 | igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); | 2470 | igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); |
@@ -2552,14 +2552,11 @@ void ipv6_mc_init_dev(struct inet6_dev *idev) | |||
2552 | write_lock_bh(&idev->lock); | 2552 | write_lock_bh(&idev->lock); |
2553 | spin_lock_init(&idev->mc_lock); | 2553 | spin_lock_init(&idev->mc_lock); |
2554 | idev->mc_gq_running = 0; | 2554 | idev->mc_gq_running = 0; |
2555 | setup_timer(&idev->mc_gq_timer, mld_gq_timer_expire, | 2555 | timer_setup(&idev->mc_gq_timer, mld_gq_timer_expire, 0); |
2556 | (unsigned long)idev); | ||
2557 | idev->mc_tomb = NULL; | 2556 | idev->mc_tomb = NULL; |
2558 | idev->mc_ifc_count = 0; | 2557 | idev->mc_ifc_count = 0; |
2559 | setup_timer(&idev->mc_ifc_timer, mld_ifc_timer_expire, | 2558 | timer_setup(&idev->mc_ifc_timer, mld_ifc_timer_expire, 0); |
2560 | (unsigned long)idev); | 2559 | timer_setup(&idev->mc_dad_timer, mld_dad_timer_expire, 0); |
2561 | setup_timer(&idev->mc_dad_timer, mld_dad_timer_expire, | ||
2562 | (unsigned long)idev); | ||
2563 | ipv6_mc_reset(idev); | 2560 | ipv6_mc_reset(idev); |
2564 | write_unlock_bh(&idev->lock); | 2561 | write_unlock_bh(&idev->lock); |
2565 | } | 2562 | } |
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/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index a2b904a718c6..c989211bbabc 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c | |||
@@ -184,9 +184,9 @@ report: | |||
184 | nd->handler(nd); | 184 | nd->handler(nd); |
185 | } | 185 | } |
186 | 186 | ||
187 | static void ncsi_channel_monitor(unsigned long data) | 187 | static void ncsi_channel_monitor(struct timer_list *t) |
188 | { | 188 | { |
189 | struct ncsi_channel *nc = (struct ncsi_channel *)data; | 189 | struct ncsi_channel *nc = from_timer(nc, t, monitor.timer); |
190 | struct ncsi_package *np = nc->package; | 190 | struct ncsi_package *np = nc->package; |
191 | struct ncsi_dev_priv *ndp = np->ndp; | 191 | struct ncsi_dev_priv *ndp = np->ndp; |
192 | struct ncsi_channel_mode *ncm; | 192 | struct ncsi_channel_mode *ncm; |
@@ -313,8 +313,7 @@ struct ncsi_channel *ncsi_add_channel(struct ncsi_package *np, unsigned char id) | |||
313 | nc->package = np; | 313 | nc->package = np; |
314 | nc->state = NCSI_CHANNEL_INACTIVE; | 314 | nc->state = NCSI_CHANNEL_INACTIVE; |
315 | nc->monitor.enabled = false; | 315 | nc->monitor.enabled = false; |
316 | setup_timer(&nc->monitor.timer, | 316 | timer_setup(&nc->monitor.timer, ncsi_channel_monitor, 0); |
317 | ncsi_channel_monitor, (unsigned long)nc); | ||
318 | spin_lock_init(&nc->lock); | 317 | spin_lock_init(&nc->lock); |
319 | INIT_LIST_HEAD(&nc->link); | 318 | INIT_LIST_HEAD(&nc->link); |
320 | for (index = 0; index < NCSI_CAP_MAX; index++) | 319 | for (index = 0; index < NCSI_CAP_MAX; index++) |
@@ -529,9 +528,9 @@ struct ncsi_dev *ncsi_find_dev(struct net_device *dev) | |||
529 | return NULL; | 528 | return NULL; |
530 | } | 529 | } |
531 | 530 | ||
532 | static void ncsi_request_timeout(unsigned long data) | 531 | static void ncsi_request_timeout(struct timer_list *t) |
533 | { | 532 | { |
534 | struct ncsi_request *nr = (struct ncsi_request *)data; | 533 | struct ncsi_request *nr = from_timer(nr, t, timer); |
535 | struct ncsi_dev_priv *ndp = nr->ndp; | 534 | struct ncsi_dev_priv *ndp = nr->ndp; |
536 | unsigned long flags; | 535 | unsigned long flags; |
537 | 536 | ||
@@ -1577,9 +1576,7 @@ struct ncsi_dev *ncsi_register_dev(struct net_device *dev, | |||
1577 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { | 1576 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { |
1578 | ndp->requests[i].id = i; | 1577 | ndp->requests[i].id = i; |
1579 | ndp->requests[i].ndp = ndp; | 1578 | ndp->requests[i].ndp = ndp; |
1580 | setup_timer(&ndp->requests[i].timer, | 1579 | timer_setup(&ndp->requests[i].timer, ncsi_request_timeout, 0); |
1581 | ncsi_request_timeout, | ||
1582 | (unsigned long)&ndp->requests[i]); | ||
1583 | } | 1580 | } |
1584 | 1581 | ||
1585 | spin_lock_irqsave(&ncsi_dev_lock, flags); | 1582 | spin_lock_irqsave(&ncsi_dev_lock, flags); |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 64778f9a8548..d6748a8a79c5 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -67,9 +67,9 @@ void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp, | |||
67 | } | 67 | } |
68 | EXPORT_SYMBOL_GPL(nf_ct_unlink_expect_report); | 68 | EXPORT_SYMBOL_GPL(nf_ct_unlink_expect_report); |
69 | 69 | ||
70 | static void nf_ct_expectation_timed_out(unsigned long ul_expect) | 70 | static void nf_ct_expectation_timed_out(struct timer_list *t) |
71 | { | 71 | { |
72 | struct nf_conntrack_expect *exp = (void *)ul_expect; | 72 | struct nf_conntrack_expect *exp = from_timer(exp, t, timeout); |
73 | 73 | ||
74 | spin_lock_bh(&nf_conntrack_expect_lock); | 74 | spin_lock_bh(&nf_conntrack_expect_lock); |
75 | nf_ct_unlink_expect(exp); | 75 | nf_ct_unlink_expect(exp); |
@@ -368,8 +368,7 @@ static void nf_ct_expect_insert(struct nf_conntrack_expect *exp) | |||
368 | /* two references : one for hash insert, one for the timer */ | 368 | /* two references : one for hash insert, one for the timer */ |
369 | refcount_add(2, &exp->use); | 369 | refcount_add(2, &exp->use); |
370 | 370 | ||
371 | setup_timer(&exp->timeout, nf_ct_expectation_timed_out, | 371 | timer_setup(&exp->timeout, nf_ct_expectation_timed_out, 0); |
372 | (unsigned long)exp); | ||
373 | helper = rcu_dereference_protected(master_help->helper, | 372 | helper = rcu_dereference_protected(master_help->helper, |
374 | lockdep_is_held(&nf_conntrack_expect_lock)); | 373 | lockdep_is_held(&nf_conntrack_expect_lock)); |
375 | if (helper) { | 374 | if (helper) { |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index cad6498f10b0..e5afab86381c 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -151,7 +151,7 @@ instance_put(struct nfulnl_instance *inst) | |||
151 | call_rcu_bh(&inst->rcu, nfulnl_instance_free_rcu); | 151 | call_rcu_bh(&inst->rcu, nfulnl_instance_free_rcu); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void nfulnl_timer(unsigned long data); | 154 | static void nfulnl_timer(struct timer_list *t); |
155 | 155 | ||
156 | static struct nfulnl_instance * | 156 | static struct nfulnl_instance * |
157 | instance_create(struct net *net, u_int16_t group_num, | 157 | instance_create(struct net *net, u_int16_t group_num, |
@@ -184,7 +184,7 @@ instance_create(struct net *net, u_int16_t group_num, | |||
184 | /* needs to be two, since we _put() after creation */ | 184 | /* needs to be two, since we _put() after creation */ |
185 | refcount_set(&inst->use, 2); | 185 | refcount_set(&inst->use, 2); |
186 | 186 | ||
187 | setup_timer(&inst->timer, nfulnl_timer, (unsigned long)inst); | 187 | timer_setup(&inst->timer, nfulnl_timer, 0); |
188 | 188 | ||
189 | inst->net = get_net(net); | 189 | inst->net = get_net(net); |
190 | inst->peer_user_ns = user_ns; | 190 | inst->peer_user_ns = user_ns; |
@@ -377,9 +377,9 @@ __nfulnl_flush(struct nfulnl_instance *inst) | |||
377 | } | 377 | } |
378 | 378 | ||
379 | static void | 379 | static void |
380 | nfulnl_timer(unsigned long data) | 380 | nfulnl_timer(struct timer_list *t) |
381 | { | 381 | { |
382 | struct nfulnl_instance *inst = (struct nfulnl_instance *)data; | 382 | struct nfulnl_instance *inst = from_timer(inst, t, timer); |
383 | 383 | ||
384 | spin_lock_bh(&inst->lock); | 384 | spin_lock_bh(&inst->lock); |
385 | if (inst->skb) | 385 | if (inst->skb) |
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index daf45da448fa..ee3421ad108d 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c | |||
@@ -107,9 +107,9 @@ static void idletimer_tg_work(struct work_struct *work) | |||
107 | sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); | 107 | sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void idletimer_tg_expired(unsigned long data) | 110 | static void idletimer_tg_expired(struct timer_list *t) |
111 | { | 111 | { |
112 | struct idletimer_tg *timer = (struct idletimer_tg *) data; | 112 | struct idletimer_tg *timer = from_timer(timer, t, timer); |
113 | 113 | ||
114 | pr_debug("timer %s expired\n", timer->attr.attr.name); | 114 | pr_debug("timer %s expired\n", timer->attr.attr.name); |
115 | 115 | ||
@@ -143,8 +143,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) | |||
143 | 143 | ||
144 | list_add(&info->timer->entry, &idletimer_tg_list); | 144 | list_add(&info->timer->entry, &idletimer_tg_list); |
145 | 145 | ||
146 | setup_timer(&info->timer->timer, idletimer_tg_expired, | 146 | timer_setup(&info->timer->timer, idletimer_tg_expired, 0); |
147 | (unsigned long) info->timer); | ||
148 | info->timer->refcnt = 1; | 147 | info->timer->refcnt = 1; |
149 | 148 | ||
150 | mod_timer(&info->timer->timer, | 149 | mod_timer(&info->timer->timer, |
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index 3ba31c194cce..0971634e5444 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c | |||
@@ -85,9 +85,10 @@ led_tg(struct sk_buff *skb, const struct xt_action_param *par) | |||
85 | return XT_CONTINUE; | 85 | return XT_CONTINUE; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void led_timeout_callback(unsigned long data) | 88 | static void led_timeout_callback(struct timer_list *t) |
89 | { | 89 | { |
90 | struct xt_led_info_internal *ledinternal = (struct xt_led_info_internal *)data; | 90 | struct xt_led_info_internal *ledinternal = from_timer(ledinternal, t, |
91 | timer); | ||
91 | 92 | ||
92 | led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); | 93 | led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); |
93 | } | 94 | } |
@@ -143,8 +144,7 @@ static int led_tg_check(const struct xt_tgchk_param *par) | |||
143 | 144 | ||
144 | /* See if we need to set up a timer */ | 145 | /* See if we need to set up a timer */ |
145 | if (ledinfo->delay > 0) | 146 | if (ledinfo->delay > 0) |
146 | setup_timer(&ledinternal->timer, led_timeout_callback, | 147 | timer_setup(&ledinternal->timer, led_timeout_callback, 0); |
147 | (unsigned long)ledinternal); | ||
148 | 148 | ||
149 | list_add_tail(&ledinternal->list, &xt_led_triggers); | 149 | list_add_tail(&ledinternal->list, &xt_led_triggers); |
150 | 150 | ||
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_loopback.c b/net/netrom/nr_loopback.c index 989ae647825e..215ad22a9647 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <net/netrom.h> | 15 | #include <net/netrom.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | 17 | ||
18 | static void nr_loopback_timer(unsigned long); | 18 | static void nr_loopback_timer(struct timer_list *); |
19 | 19 | ||
20 | static struct sk_buff_head loopback_queue; | 20 | static struct sk_buff_head loopback_queue; |
21 | static DEFINE_TIMER(loopback_timer, nr_loopback_timer); | 21 | static DEFINE_TIMER(loopback_timer, nr_loopback_timer); |
@@ -48,7 +48,7 @@ int nr_loopback_queue(struct sk_buff *skb) | |||
48 | return 1; | 48 | return 1; |
49 | } | 49 | } |
50 | 50 | ||
51 | static void nr_loopback_timer(unsigned long param) | 51 | static void nr_loopback_timer(struct timer_list *unused) |
52 | { | 52 | { |
53 | struct sk_buff *skb; | 53 | struct sk_buff *skb; |
54 | ax25_address *nr_dest; | 54 | ax25_address *nr_dest; |
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/nfc/nci/core.c b/net/nfc/nci/core.c index c25e9b4179c3..074960154993 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -591,18 +591,18 @@ static int nci_close_device(struct nci_dev *ndev) | |||
591 | } | 591 | } |
592 | 592 | ||
593 | /* NCI command timer function */ | 593 | /* NCI command timer function */ |
594 | static void nci_cmd_timer(unsigned long arg) | 594 | static void nci_cmd_timer(struct timer_list *t) |
595 | { | 595 | { |
596 | struct nci_dev *ndev = (void *) arg; | 596 | struct nci_dev *ndev = from_timer(ndev, t, cmd_timer); |
597 | 597 | ||
598 | atomic_set(&ndev->cmd_cnt, 1); | 598 | atomic_set(&ndev->cmd_cnt, 1); |
599 | queue_work(ndev->cmd_wq, &ndev->cmd_work); | 599 | queue_work(ndev->cmd_wq, &ndev->cmd_work); |
600 | } | 600 | } |
601 | 601 | ||
602 | /* NCI data exchange timer function */ | 602 | /* NCI data exchange timer function */ |
603 | static void nci_data_timer(unsigned long arg) | 603 | static void nci_data_timer(struct timer_list *t) |
604 | { | 604 | { |
605 | struct nci_dev *ndev = (void *) arg; | 605 | struct nci_dev *ndev = from_timer(ndev, t, data_timer); |
606 | 606 | ||
607 | set_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); | 607 | set_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); |
608 | queue_work(ndev->rx_wq, &ndev->rx_work); | 608 | queue_work(ndev->rx_wq, &ndev->rx_work); |
@@ -1232,10 +1232,8 @@ int nci_register_device(struct nci_dev *ndev) | |||
1232 | skb_queue_head_init(&ndev->rx_q); | 1232 | skb_queue_head_init(&ndev->rx_q); |
1233 | skb_queue_head_init(&ndev->tx_q); | 1233 | skb_queue_head_init(&ndev->tx_q); |
1234 | 1234 | ||
1235 | setup_timer(&ndev->cmd_timer, nci_cmd_timer, | 1235 | timer_setup(&ndev->cmd_timer, nci_cmd_timer, 0); |
1236 | (unsigned long) ndev); | 1236 | timer_setup(&ndev->data_timer, nci_data_timer, 0); |
1237 | setup_timer(&ndev->data_timer, nci_data_timer, | ||
1238 | (unsigned long) ndev); | ||
1239 | 1237 | ||
1240 | mutex_init(&ndev->req_lock); | 1238 | mutex_init(&ndev->req_lock); |
1241 | INIT_LIST_HEAD(&ndev->conn_info_list); | 1239 | INIT_LIST_HEAD(&ndev->conn_info_list); |
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/rxrpc/call_object.c b/net/rxrpc/call_object.c index 4c7fbc6dcce7..994dc2df57e4 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -45,9 +45,9 @@ const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = { | |||
45 | 45 | ||
46 | struct kmem_cache *rxrpc_call_jar; | 46 | struct kmem_cache *rxrpc_call_jar; |
47 | 47 | ||
48 | static void rxrpc_call_timer_expired(unsigned long _call) | 48 | static void rxrpc_call_timer_expired(struct timer_list *t) |
49 | { | 49 | { |
50 | struct rxrpc_call *call = (struct rxrpc_call *)_call; | 50 | struct rxrpc_call *call = from_timer(call, t, timer); |
51 | 51 | ||
52 | _enter("%d", call->debug_id); | 52 | _enter("%d", call->debug_id); |
53 | 53 | ||
@@ -114,8 +114,7 @@ struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp) | |||
114 | goto nomem_2; | 114 | goto nomem_2; |
115 | 115 | ||
116 | mutex_init(&call->user_mutex); | 116 | mutex_init(&call->user_mutex); |
117 | setup_timer(&call->timer, rxrpc_call_timer_expired, | 117 | timer_setup(&call->timer, rxrpc_call_timer_expired, 0); |
118 | (unsigned long)call); | ||
119 | INIT_WORK(&call->processor, &rxrpc_process_call); | 118 | INIT_WORK(&call->processor, &rxrpc_process_call); |
120 | INIT_LIST_HEAD(&call->link); | 119 | INIT_LIST_HEAD(&call->link); |
121 | INIT_LIST_HEAD(&call->chan_wait_link); | 120 | INIT_LIST_HEAD(&call->chan_wait_link); |
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/wireless/lib80211.c b/net/wireless/lib80211.c index 459611577d3d..801d4781a73b 100644 --- a/net/wireless/lib80211.c +++ b/net/wireless/lib80211.c | |||
@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(lib80211_crypto_lock); | |||
44 | static void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, | 44 | static void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, |
45 | int force); | 45 | int force); |
46 | static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info); | 46 | static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info); |
47 | static void lib80211_crypt_deinit_handler(unsigned long data); | 47 | static void lib80211_crypt_deinit_handler(struct timer_list *t); |
48 | 48 | ||
49 | int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, | 49 | int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, |
50 | spinlock_t *lock) | 50 | spinlock_t *lock) |
@@ -55,8 +55,8 @@ int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, | |||
55 | info->lock = lock; | 55 | info->lock = lock; |
56 | 56 | ||
57 | INIT_LIST_HEAD(&info->crypt_deinit_list); | 57 | INIT_LIST_HEAD(&info->crypt_deinit_list); |
58 | setup_timer(&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, | 58 | timer_setup(&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, |
59 | (unsigned long)info); | 59 | 0); |
60 | 60 | ||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
@@ -116,9 +116,10 @@ static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info) | |||
116 | spin_unlock_irqrestore(info->lock, flags); | 116 | spin_unlock_irqrestore(info->lock, flags); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void lib80211_crypt_deinit_handler(unsigned long data) | 119 | static void lib80211_crypt_deinit_handler(struct timer_list *t) |
120 | { | 120 | { |
121 | struct lib80211_crypt_info *info = (struct lib80211_crypt_info *)data; | 121 | struct lib80211_crypt_info *info = from_timer(info, t, |
122 | crypt_deinit_timer); | ||
122 | unsigned long flags; | 123 | unsigned long flags; |
123 | 124 | ||
124 | lib80211_crypt_deinit_entries(info, 0); | 125 | lib80211_crypt_deinit_entries(info, 0); |
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_link.c b/net/x25/x25_link.c index e0cd04d28352..a6a8ab09b914 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c | |||
@@ -36,7 +36,7 @@ | |||
36 | LIST_HEAD(x25_neigh_list); | 36 | LIST_HEAD(x25_neigh_list); |
37 | DEFINE_RWLOCK(x25_neigh_list_lock); | 37 | DEFINE_RWLOCK(x25_neigh_list_lock); |
38 | 38 | ||
39 | static void x25_t20timer_expiry(unsigned long); | 39 | static void x25_t20timer_expiry(struct timer_list *); |
40 | 40 | ||
41 | static void x25_transmit_restart_confirmation(struct x25_neigh *nb); | 41 | static void x25_transmit_restart_confirmation(struct x25_neigh *nb); |
42 | static void x25_transmit_restart_request(struct x25_neigh *nb); | 42 | static void x25_transmit_restart_request(struct x25_neigh *nb); |
@@ -49,9 +49,9 @@ static inline void x25_start_t20timer(struct x25_neigh *nb) | |||
49 | mod_timer(&nb->t20timer, jiffies + nb->t20); | 49 | mod_timer(&nb->t20timer, jiffies + nb->t20); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void x25_t20timer_expiry(unsigned long param) | 52 | static void x25_t20timer_expiry(struct timer_list *t) |
53 | { | 53 | { |
54 | struct x25_neigh *nb = (struct x25_neigh *)param; | 54 | struct x25_neigh *nb = from_timer(nb, t, t20timer); |
55 | 55 | ||
56 | x25_transmit_restart_request(nb); | 56 | x25_transmit_restart_request(nb); |
57 | 57 | ||
@@ -252,7 +252,7 @@ void x25_link_device_up(struct net_device *dev) | |||
252 | return; | 252 | return; |
253 | 253 | ||
254 | skb_queue_head_init(&nb->queue); | 254 | skb_queue_head_init(&nb->queue); |
255 | setup_timer(&nb->t20timer, x25_t20timer_expiry, (unsigned long)nb); | 255 | timer_setup(&nb->t20timer, x25_t20timer_expiry, 0); |
256 | 256 | ||
257 | dev_hold(dev); | 257 | dev_hold(dev); |
258 | nb->dev = dev; | 258 | nb->dev = dev; |
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/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 1f5cee2269af..065d89606888 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -556,7 +556,7 @@ out: | |||
556 | return HRTIMER_NORESTART; | 556 | return HRTIMER_NORESTART; |
557 | } | 557 | } |
558 | 558 | ||
559 | static void xfrm_replay_timer_handler(unsigned long data); | 559 | static void xfrm_replay_timer_handler(struct timer_list *t); |
560 | 560 | ||
561 | struct xfrm_state *xfrm_state_alloc(struct net *net) | 561 | struct xfrm_state *xfrm_state_alloc(struct net *net) |
562 | { | 562 | { |
@@ -574,8 +574,7 @@ struct xfrm_state *xfrm_state_alloc(struct net *net) | |||
574 | INIT_HLIST_NODE(&x->byspi); | 574 | INIT_HLIST_NODE(&x->byspi); |
575 | tasklet_hrtimer_init(&x->mtimer, xfrm_timer_handler, | 575 | tasklet_hrtimer_init(&x->mtimer, xfrm_timer_handler, |
576 | CLOCK_BOOTTIME, HRTIMER_MODE_ABS); | 576 | CLOCK_BOOTTIME, HRTIMER_MODE_ABS); |
577 | setup_timer(&x->rtimer, xfrm_replay_timer_handler, | 577 | timer_setup(&x->rtimer, xfrm_replay_timer_handler, 0); |
578 | (unsigned long)x); | ||
579 | x->curlft.add_time = get_seconds(); | 578 | x->curlft.add_time = get_seconds(); |
580 | x->lft.soft_byte_limit = XFRM_INF; | 579 | x->lft.soft_byte_limit = XFRM_INF; |
581 | x->lft.soft_packet_limit = XFRM_INF; | 580 | x->lft.soft_packet_limit = XFRM_INF; |
@@ -1879,9 +1878,9 @@ void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net) | |||
1879 | } | 1878 | } |
1880 | EXPORT_SYMBOL(xfrm_state_walk_done); | 1879 | EXPORT_SYMBOL(xfrm_state_walk_done); |
1881 | 1880 | ||
1882 | static void xfrm_replay_timer_handler(unsigned long data) | 1881 | static void xfrm_replay_timer_handler(struct timer_list *t) |
1883 | { | 1882 | { |
1884 | struct xfrm_state *x = (struct xfrm_state *)data; | 1883 | struct xfrm_state *x = from_timer(x, t, rtimer); |
1885 | 1884 | ||
1886 | spin_lock(&x->lock); | 1885 | spin_lock(&x->lock); |
1887 | 1886 | ||