Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1598207 > unrolled thread
| Started by | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| First post | 2017-03-11 01:50 +0100 |
| Last post | 2017-03-13 07:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] drop_monitor: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-03-11 01:50 +0100
Re: [PATCH] drop_monitor: use setup_timer David Miller <davem@davemloft.net> - 2017-03-13 07:50 +0100
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Date | 2017-03-11 01:50 +0100 |
| Subject | [PATCH] drop_monitor: use setup_timer |
| Message-ID | <tjDol-3gr-1@gated-at.bofh.it> |
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
net/core/drop_monitor.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index fb55327..70ccda2 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -412,9 +412,8 @@ static int __init init_net_drop_monitor(void)
for_each_possible_cpu(cpu) {
data = &per_cpu(dm_cpu_data, cpu);
INIT_WORK(&data->dm_alert_work, send_dm_alert);
- init_timer(&data->send_timer);
- data->send_timer.data = (unsigned long)data;
- data->send_timer.function = sched_send_work;
+ setup_timer(&data->send_timer, sched_send_work,
+ (unsigned long)data);
spin_lock_init(&data->lock);
reset_per_cpu_data(data);
}
--
2.9.3
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-03-13 07:50 +0100 |
| Message-ID | <tkrXP-4X5-11@gated-at.bofh.it> |
| In reply to | #1598207 |
From: Geliang Tang <geliangtang@gmail.com> Date: Sat, 11 Mar 2017 08:46:59 +0800 > Use setup_timer() instead of init_timer() to simplify the code. > > Signed-off-by: Geliang Tang <geliangtang@gmail.com> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web