All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, Allen Pais <allen.lkml@gmail.com>
Subject: [PATCH 1/3] powerpc: oprofile: use setup_timer() helper.
Date: Fri, 22 Sep 2017 17:04:58 +0530	[thread overview]
Message-ID: <1506080100-5660-2-git-send-email-allen.lkml@gmail.com> (raw)
In-Reply-To: <1506080100-5660-1-git-send-email-allen.lkml@gmail.com>

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

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 arch/powerpc/oprofile/op_model_cell.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index c82497a..264b6ab 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -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);
 }
-- 
2.7.4

  reply	other threads:[~2017-09-22 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 11:34 [PATCH 0/3] use setup_timer() helper function Allen Pais
2017-09-22 11:34 ` Allen Pais [this message]
2017-10-05  4:21   ` [1/3] powerpc: oprofile: use setup_timer() helper Michael Ellerman
2017-09-22 11:34 ` [PATCH 2/3] powerpc: " Allen Pais
2017-09-22 11:35 ` [PATCH 3/3] powerpc: powermac: " Allen Pais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506080100-5660-2-git-send-email-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.