* [PATCH] ambassador: use setup_timer
[not found] <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com>
@ 2017-03-11 0:46 ` Geliang Tang
2017-03-13 6:47 ` David Miller
2017-03-11 0:46 ` [PATCH] drop_monitor: " Geliang Tang
1 sibling, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2017-03-11 0:46 UTC (permalink / raw)
To: Chas Williams; +Cc: Geliang Tang, linux-atm-general, netdev, linux-kernel
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/atm/ambassador.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 4a61079..906705e 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2267,9 +2267,8 @@ static int amb_probe(struct pci_dev *pci_dev,
dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS;
dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS;
- init_timer(&dev->housekeeping);
- dev->housekeeping.function = do_housekeeping;
- dev->housekeeping.data = (unsigned long) dev;
+ setup_timer(&dev->housekeeping, do_housekeeping,
+ (unsigned long)dev);
mod_timer(&dev->housekeeping, jiffies);
// enable host interrupts
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drop_monitor: use setup_timer
[not found] <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com>
2017-03-11 0:46 ` [PATCH] ambassador: use setup_timer Geliang Tang
@ 2017-03-11 0:46 ` Geliang Tang
2017-03-13 6:47 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Geliang Tang @ 2017-03-11 0:46 UTC (permalink / raw)
To: Neil Horman, David S. Miller; +Cc: Geliang Tang, netdev, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ambassador: use setup_timer
2017-03-11 0:46 ` [PATCH] ambassador: use setup_timer Geliang Tang
@ 2017-03-13 6:47 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-13 6:47 UTC (permalink / raw)
To: geliangtang; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel
From: Geliang Tang <geliangtang@gmail.com>
Date: Sat, 11 Mar 2017 08:46:56 +0800
> Use setup_timer() instead of init_timer() to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drop_monitor: use setup_timer
2017-03-11 0:46 ` [PATCH] drop_monitor: " Geliang Tang
@ 2017-03-13 6:47 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-13 6:47 UTC (permalink / raw)
To: geliangtang; +Cc: nhorman, netdev, linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-13 6:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com>
2017-03-11 0:46 ` [PATCH] ambassador: use setup_timer Geliang Tang
2017-03-13 6:47 ` David Miller
2017-03-11 0:46 ` [PATCH] drop_monitor: " Geliang Tang
2017-03-13 6:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).