* [PATCH 0/5] use setup_timer() helper function.
@ 2017-09-22 11:16 Allen Pais
2017-09-22 11:16 ` [PATCH 1/5] block: amiflop: use setup_timer() helper Allen Pais
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
This series uses setup_timer() helper function. The series
addresses the files under drivers/block/*.
Allen Pais (5):
block: amiflop: use setup_timer() helper.
block: aoe: use setup_timer() helper.
block: aoe: use setup_timer() helper.
block: umem: use setup_timer() helper.
block: DAC960: use setup_timer() helper.
drivers/block/DAC960.c | 5 ++---
drivers/block/amiflop.c | 16 ++++------------
drivers/block/aoe/aoedev.c | 4 +---
drivers/block/aoe/aoemain.c | 4 +---
drivers/block/umem.c | 3 +--
5 files changed, 9 insertions(+), 23 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/5] block: amiflop: use setup_timer() helper.
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
@ 2017-09-22 11:16 ` Allen Pais
2017-09-22 11:16 ` [PATCH 2/5] block: aoe: " Allen Pais
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/block/amiflop.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 49908c7..c4b1cba 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1792,27 +1792,19 @@ static int __init amiga_floppy_probe(struct platform_device *pdev)
floppy_find, NULL, NULL);
/* initialize variables */
- init_timer(&motor_on_timer);
+ setup_timer(&motor_on_timer, motor_on_callback, 0);
motor_on_timer.expires = 0;
- motor_on_timer.data = 0;
- motor_on_timer.function = motor_on_callback;
for (i = 0; i < FD_MAX_UNITS; i++) {
- init_timer(&motor_off_timer[i]);
+ setup_timer(&motor_off_timer[i], fd_motor_off, i | 0x80000000);
motor_off_timer[i].expires = 0;
- motor_off_timer[i].data = i|0x80000000;
- motor_off_timer[i].function = fd_motor_off;
- init_timer(&flush_track_timer[i]);
+ setup_timer(&flush_track_timer[i], flush_track_callback, i);
flush_track_timer[i].expires = 0;
- flush_track_timer[i].data = i;
- flush_track_timer[i].function = flush_track_callback;
unit[i].track = -1;
}
- init_timer(&post_write_timer);
+ setup_timer(&post_write_timer, post_write, 0);
post_write_timer.expires = 0;
- post_write_timer.data = 0;
- post_write_timer.function = post_write;
for (i = 0; i < 128; i++)
mfmdecode[i]=255;
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/5] block: aoe: use setup_timer() helper.
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 11:16 ` [PATCH 1/5] block: amiflop: use setup_timer() helper Allen Pais
@ 2017-09-22 11:16 ` Allen Pais
2017-09-22 11:16 ` [PATCH 3/5] " Allen Pais
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/block/aoe/aoemain.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/aoe/aoemain.c b/drivers/block/aoe/aoemain.c
index 4b987c2..20865d4 100644
--- a/drivers/block/aoe/aoemain.c
+++ b/drivers/block/aoe/aoemain.c
@@ -28,10 +28,8 @@ discover_timer(ulong vp)
switch (vp) {
case TINIT:
- init_timer(&t);
+ setup_timer(&t, discover_timer, TRUN);
spin_lock_init(&lock);
- t.data = TRUN;
- t.function = discover_timer;
die = 0;
case TRUN:
spin_lock_irqsave(&lock, flags);
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/5] block: aoe: use setup_timer() helper.
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 11:16 ` [PATCH 1/5] block: amiflop: use setup_timer() helper Allen Pais
2017-09-22 11:16 ` [PATCH 2/5] block: aoe: " Allen Pais
@ 2017-09-22 11:16 ` Allen Pais
2017-09-22 11:16 ` [PATCH 4/5] block: umem: " Allen Pais
2017-09-22 11:16 ` [PATCH 5/5] block: DAC960: " Allen Pais
4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/block/aoe/aoedev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index b28fefb..1461cfc 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -466,9 +466,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc)
INIT_WORK(&d->work, aoecmd_sleepwork);
spin_lock_init(&d->lock);
skb_queue_head_init(&d->skbpool);
- init_timer(&d->timer);
- d->timer.data = (ulong) d;
- d->timer.function = dummy_timer;
+ setup_timer(&d->timer, dummy_timer, (ulong)d);
d->timer.expires = jiffies + HZ;
add_timer(&d->timer);
d->bufpool = NULL; /* defer to aoeblk_gdalloc */
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/5] block: umem: use setup_timer() helper.
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
` (2 preceding siblings ...)
2017-09-22 11:16 ` [PATCH 3/5] " Allen Pais
@ 2017-09-22 11:16 ` Allen Pais
2017-09-22 11:16 ` [PATCH 5/5] block: DAC960: " Allen Pais
4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/block/umem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index 0677d25..b4d4ccf 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -738,8 +738,7 @@ static void check_all_batteries(unsigned long ptr)
static void init_battery_timer(void)
{
- init_timer(&battery_timer);
- battery_timer.function = check_all_batteries;
+ setup_timer(&battery_timer, check_all_batteries, 0UL);
battery_timer.expires = jiffies + (HZ * 60);
add_timer(&battery_timer);
}
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/5] block: DAC960: use setup_timer() helper.
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
` (3 preceding siblings ...)
2017-09-22 11:16 ` [PATCH 4/5] block: umem: " Allen Pais
@ 2017-09-22 11:16 ` Allen Pais
4 siblings, 0 replies; 6+ messages in thread
From: Allen Pais @ 2017-09-22 11:16 UTC (permalink / raw)
To: linux-kernel; +Cc: ed.cashin, Allen Pais
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
drivers/block/DAC960.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 255591a..83dc8ca 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -3079,11 +3079,10 @@ DAC960_InitializeController(DAC960_Controller_T *Controller)
/*
Initialize the Monitoring Timer.
*/
- init_timer(&Controller->MonitoringTimer);
+ setup_timer(&Controller->MonitoringTimer,
+ DAC960_MonitoringTimerFunction, (unsigned long)Controller);
Controller->MonitoringTimer.expires =
jiffies + DAC960_MonitoringTimerInterval;
- Controller->MonitoringTimer.data = (unsigned long) Controller;
- Controller->MonitoringTimer.function = DAC960_MonitoringTimerFunction;
add_timer(&Controller->MonitoringTimer);
Controller->ControllerInitialized = true;
return true;
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-22 11:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 11:16 ` [PATCH 1/5] block: amiflop: use setup_timer() helper Allen Pais
2017-09-22 11:16 ` [PATCH 2/5] block: aoe: " Allen Pais
2017-09-22 11:16 ` [PATCH 3/5] " Allen Pais
2017-09-22 11:16 ` [PATCH 4/5] block: umem: " Allen Pais
2017-09-22 11:16 ` [PATCH 5/5] block: DAC960: " Allen Pais
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®