Skip to contentSkip to conversation

use setup_timer() helper function.

PATCH In review Allen Pais 2 participants 5 messages Sep 22, 2017 – Oct 5, 2017

Subsystems (2)
lore
Share & tools
lore

Allen Pais

author
#0 lore raw

cover use setup_timer() helper function.

This series uses setup_timer() helper function. The series addresses the files under arch/powerpc/*.

Allen Pais (3):
powerpc: oprofile: use setup_timer() helper.
powerpc: use setup_timer() helper.
powerpc: powermac: use setup_timer() helper.

 arch/powerpc/kernel/tau_6xx.c             | 3 +--
 arch/powerpc/oprofile/op_model_cell.c     | 8 ++------
 arch/powerpc/platforms/powermac/low_i2c.c | 4 +---
 3 files changed, 4 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/3 powerpc: oprofile: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the function and data fields.

---
 arch/powerpc/oprofile/op_model_cell.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/powerpc/oprofile/op_model_cell.c +2 -6
index c82497a..264b6ab 100644
@@ -555,9 +555,7 @@ static void cell_virtual_cntr(unsigned long data)
 
 static void start_virt_cntrs(void)
 {
-	init_timer(&timer_virt_cntr);
-	timer_virt_cntr.function = cell_virtual_cntr;
-	timer_virt_cntr.data = 0UL;
+	setup_timer(&timer_virt_cntr, cell_virtual_cntr, 0UL);
 	timer_virt_cntr.expires = jiffies + HZ / 10;
 	add_timer(&timer_virt_cntr);
 }
@@ -679,9 +677,7 @@ static void spu_evnt_swap(unsigned long data)
 
 static void start_spu_event_swap(void)
 {
-	init_timer(&timer_spu_event_swap);
-	timer_spu_event_swap.function = spu_evnt_swap;
-	timer_spu_event_swap.data = 0UL;
+	setup_timer(&timer_spu_event_swap, spu_evnt_swap, 0UL);
 	timer_spu_event_swap.expires = jiffies + HZ / 25;
 	add_timer(&timer_spu_event_swap);
 }
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH 2/3 powerpc: use setup_timer() helper.

In reply to Allen Pais

Use setup_timer function instead of initializing timer with the function and data fields.

---
 arch/powerpc/kernel/tau_6xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/tau_6xx.c +1 -2
index a753b72..726c2d6 100644
@@ -229,8 +229,7 @@ int __init TAU_init(void)
 
 
 	/* first, set up the window shrinking timer */
-	init_timer(&tau_timer);
-	tau_timer.function = tau_timeout_smp;
+	setup_timer(&tau_timer, tau_timeout_smp, 0UL);
 	tau_timer.expires = jiffies + shrink_timer;
 	add_timer(&tau_timer);
 
Signature · 1 line
2.7.4
author
#4 lore raw

PATCH 3/3 powerpc: powermac: use setup_timer() helper.

In reply to Allen Pais

Use setup_timer function instead of initializing timer with the function and data fields.

---
 arch/powerpc/platforms/powermac/low_i2c.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/platforms/powermac/low_i2c.c +1 -3
index 70183eb..39a1d42 100644
@@ -513,9 +513,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
 	mutex_init(&host->mutex);
 	init_completion(&host->complete);
 	spin_lock_init(&host->lock);
-	init_timer(&host->timeout_timer);
-	host->timeout_timer.function = kw_i2c_timeout;
-	host->timeout_timer.data = (unsigned long)host;
+	setup_timer(&host->timeout_timer, kw_i2c_timeout, (unsigned long)host);
 
 	psteps = of_get_property(np, "AAPL,address-step", NULL);
 	steps = psteps ? (*psteps) : 0x10;
Signature · 1 line
2.7.4