diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-11-23 10:29:05 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-11-23 10:29:05 -0500 |
commit | 866c9b94ef968445c52214b3748ecc52a8491bca (patch) | |
tree | 1fd073acb9be8e89e77b35c41e2964ac6feabee6 /net/lapb/lapb_timer.c | |
parent | aea3706cfc4d952ed6d32b6d5845b5ecd99ed7f5 (diff) | |
parent | 841b86f3289dbe858daeceec36423d4ea286fac2 (diff) |
Merge tag 'for-linus-timers-conversion-final-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/urgent
Pull the last batch of manual timer conversions from Kees Cook:
- final batch of "non trivial" timer conversions (multi-tree dependencies,
things Coccinelle couldn't handle, etc).
- treewide conversions via Coccinelle, in 4 steps:
- DEFINE_TIMER() functions converted to struct timer_list * argument
- init_timer() -> setup_timer()
- setup_timer() -> timer_setup()
- setup_timer() -> timer_setup() (with a single embedded structure)
- deprecated timer API removals (init_timer(), setup_*timer())
- finalization of new API (remove global casts)
Diffstat (limited to 'net/lapb/lapb_timer.c')
-rw-r--r-- | net/lapb/lapb_timer.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/lapb/lapb_timer.c b/net/lapb/lapb_timer.c index 1a5535bc3b8d..5d4ae01951b5 100644 --- a/net/lapb/lapb_timer.c +++ b/net/lapb/lapb_timer.c | |||
@@ -35,15 +35,14 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <net/lapb.h> | 36 | #include <net/lapb.h> |
37 | 37 | ||
38 | static void lapb_t1timer_expiry(unsigned long); | 38 | static void lapb_t1timer_expiry(struct timer_list *); |
39 | static void lapb_t2timer_expiry(unsigned long); | 39 | static void lapb_t2timer_expiry(struct timer_list *); |
40 | 40 | ||
41 | void lapb_start_t1timer(struct lapb_cb *lapb) | 41 | 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.data = (unsigned long)lapb; | 45 | lapb->t1timer.function = lapb_t1timer_expiry; |
46 | lapb->t1timer.function = &lapb_t1timer_expiry; | ||
47 | lapb->t1timer.expires = jiffies + lapb->t1; | 46 | lapb->t1timer.expires = jiffies + lapb->t1; |
48 | 47 | ||
49 | add_timer(&lapb->t1timer); | 48 | add_timer(&lapb->t1timer); |
@@ -53,8 +52,7 @@ void lapb_start_t2timer(struct lapb_cb *lapb) | |||
53 | { | 52 | { |
54 | del_timer(&lapb->t2timer); | 53 | del_timer(&lapb->t2timer); |
55 | 54 | ||
56 | lapb->t2timer.data = (unsigned long)lapb; | 55 | lapb->t2timer.function = lapb_t2timer_expiry; |
57 | lapb->t2timer.function = &lapb_t2timer_expiry; | ||
58 | lapb->t2timer.expires = jiffies + lapb->t2; | 56 | lapb->t2timer.expires = jiffies + lapb->t2; |
59 | 57 | ||
60 | add_timer(&lapb->t2timer); | 58 | add_timer(&lapb->t2timer); |
@@ -75,9 +73,9 @@ int lapb_t1timer_running(struct lapb_cb *lapb) | |||
75 | return timer_pending(&lapb->t1timer); | 73 | return timer_pending(&lapb->t1timer); |
76 | } | 74 | } |
77 | 75 | ||
78 | static void lapb_t2timer_expiry(unsigned long param) | 76 | static void lapb_t2timer_expiry(struct timer_list *t) |
79 | { | 77 | { |
80 | struct lapb_cb *lapb = (struct lapb_cb *)param; | 78 | struct lapb_cb *lapb = from_timer(lapb, t, t2timer); |
81 | 79 | ||
82 | if (lapb->condition & LAPB_ACK_PENDING_CONDITION) { | 80 | if (lapb->condition & LAPB_ACK_PENDING_CONDITION) { |
83 | lapb->condition &= ~LAPB_ACK_PENDING_CONDITION; | 81 | lapb->condition &= ~LAPB_ACK_PENDING_CONDITION; |
@@ -85,9 +83,9 @@ static void lapb_t2timer_expiry(unsigned long param) | |||
85 | } | 83 | } |
86 | } | 84 | } |
87 | 85 | ||
88 | static void lapb_t1timer_expiry(unsigned long param) | 86 | static void lapb_t1timer_expiry(struct timer_list *t) |
89 | { | 87 | { |
90 | struct lapb_cb *lapb = (struct lapb_cb *)param; | 88 | struct lapb_cb *lapb = from_timer(lapb, t, t1timer); |
91 | 89 | ||
92 | switch (lapb->state) { | 90 | switch (lapb->state) { |
93 | 91 | ||