Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255100 > unrolled thread
| Started by | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| First post | 2015-10-24 04:30 +0200 |
| Last post | 2015-10-25 09:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] staging: rdma: hfi1: Use setup_timer Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-24 04:30 +0200
Re: [PATCH 1/3] staging: rdma: hfi1: Use setup_timer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-25 09:30 +0100
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Date | 2015-10-24 04:30 +0200 |
| Subject | [PATCH 1/3] staging: rdma: hfi1: Use setup_timer |
| Message-ID | <qmWKK-3sh-11@gated-at.bofh.it> |
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.
<smpl>
@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;
</smpl>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/staging/rdma/hfi1/chip.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index 46ebc38..c403957 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -2215,9 +2215,7 @@ static void update_rcverr_timer(unsigned long opaque)
static int init_rcverr(struct hfi1_devdata *dd)
{
- init_timer(&dd->rcverr_timer);
- dd->rcverr_timer.function = update_rcverr_timer;
- dd->rcverr_timer.data = (unsigned long) dd;
+ setup_timer(&dd->rcverr_timer, update_rcverr_timer, (unsigned long)dd);
/* Assume the hardware counter has been reset */
dd->rcv_ovfl_cnt = 0;
return mod_timer(&dd->rcverr_timer, jiffies + HZ * RCVERR_CHECK_TIME);
@@ -8156,9 +8154,8 @@ static int init_cntrs(struct hfi1_devdata *dd)
struct hfi1_pportdata *ppd;
/* set up the stats timer; the add_timer is done at the end */
- init_timer(&dd->synth_stats_timer);
- dd->synth_stats_timer.function = update_synth_timer;
- dd->synth_stats_timer.data = (unsigned long) dd;
+ setup_timer(&dd->synth_stats_timer, update_synth_timer,
+ (unsigned long)dd);
/***********************/
/* per device counters */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-10-25 09:30 +0100 |
| Message-ID | <qnoQG-891-15@gated-at.bofh.it> |
| In reply to | #1255100 |
On Sat, Oct 24, 2015 at 07:58:05AM +0530, Muhammad Falak R Wani wrote: > Use the timer API function setup_timer instead of init_timer, removing > the structure field assignments. > > <smpl> > > @timer@ > expression e1,e2,e3,fn_ptr; > @@ > -init_timer(&e1); > +setup_timer(&e1, fn_ptr, e2); > ... when != fn_ptr = e3 > -e1.function = fn_ptr; > -e1.data = e2; > > </smpl> > > Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> > --- > drivers/staging/rdma/hfi1/chip.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) Again, 3 patches, all with the same subject, not good :( -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web