summaryrefslogtreecommitdiffstats
path: root/net/rose
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-23 03:40:42 -0400
committerKees Cook <keescook@chromium.org>2017-11-21 19:35:54 -0500
commit841b86f3289dbe858daeceec36423d4ea286fac2 (patch)
tree332a53d6045914798e364a534fe3a47cab56d803 /net/rose
parent919b250f8570618e84af544c3e18dad5210eb9b6 (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>
Diffstat (limited to 'net/rose')
-rw-r--r--net/rose/rose_link.c4
-rw-r--r--net/rose/rose_timer.c12
2 files changed, 8 insertions, 8 deletions
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);