* [PATCH 1/3] staging: rdma: hfi1: Use setup_timer
@ 2015-10-24 2:28 Muhammad Falak R Wani
2015-10-25 2:00 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Falak R Wani @ 2015-10-24 2:28 UTC (permalink / raw)
To: Mike Marciniszyn, Doug Ledford, Sean Hefty, Hal Rosenstock,
Greg Kroah-Hartman, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Muhammad Falak R Wani
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] staging: rdma: hfi1: Use setup_timer
2015-10-24 2:28 [PATCH 1/3] staging: rdma: hfi1: Use setup_timer Muhammad Falak R Wani
@ 2015-10-25 2:00 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-25 2:00 UTC (permalink / raw)
To: Muhammad Falak R Wani
Cc: devel, linux-rdma, linux-kernel, Mike Marciniszyn, Doug Ledford,
Sean Hefty, Hal Rosenstock
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 :(
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-25 2:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-24 2:28 [PATCH 1/3] staging: rdma: hfi1: Use setup_timer Muhammad Falak R Wani
2015-10-25 2:00 ` Greg Kroah-Hartman
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).