* [PATCH] staging: lustre: use setup_timer().
@ 2016-05-11 15:23 Muhammad Falak R Wani
2016-05-13 19:42 ` [lustre-devel] " James Simmons
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-11 15:23 UTC (permalink / raw)
To: Oleg Drokin
Cc: Andreas Dilger, Greg Kroah-Hartman, lustre-devel, devel, linux-kernel
Use setup_timer() for initializing the timer, instead of structure
assignments.
This is the preferred/standard way.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/staging/lustre/lnet/lnet/net_fault.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c
index 7d76f28..e4aceb7 100644
--- a/drivers/staging/lustre/lnet/lnet/net_fault.c
+++ b/drivers/staging/lustre/lnet/lnet/net_fault.c
@@ -760,9 +760,7 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr)
wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running);
}
- init_timer(&rule->dl_timer);
- rule->dl_timer.function = delay_timer_cb;
- rule->dl_timer.data = (unsigned long)rule;
+ setup_timer(&rule->dl_timer, delay_timer_cb, (unsigned long)rule);
spin_lock_init(&rule->dl_lock);
INIT_LIST_HEAD(&rule->dl_msg_list);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lustre-devel] [PATCH] staging: lustre: use setup_timer().
2016-05-11 15:23 [PATCH] staging: lustre: use setup_timer() Muhammad Falak R Wani
@ 2016-05-13 19:42 ` James Simmons
0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2016-05-13 19:42 UTC (permalink / raw)
To: Muhammad Falak R Wani
Cc: Oleg Drokin, devel, Greg Kroah-Hartman, linux-kernel, lustre-devel
> Use setup_timer() for initializing the timer, instead of structure
> assignments.
> This is the preferred/standard way.
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
> ---
> drivers/staging/lustre/lnet/lnet/net_fault.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c
> index 7d76f28..e4aceb7 100644
> --- a/drivers/staging/lustre/lnet/lnet/net_fault.c
> +++ b/drivers/staging/lustre/lnet/lnet/net_fault.c
> @@ -760,9 +760,7 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr)
> wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running);
> }
>
> - init_timer(&rule->dl_timer);
> - rule->dl_timer.function = delay_timer_cb;
> - rule->dl_timer.data = (unsigned long)rule;
> + setup_timer(&rule->dl_timer, delay_timer_cb, (unsigned long)rule);
>
> spin_lock_init(&rule->dl_lock);
> INIT_LIST_HEAD(&rule->dl_msg_list);
> --
> 1.9.1
>
> _______________________________________________
> lustre-devel mailing list
> lustre-devel@lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-13 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 15:23 [PATCH] staging: lustre: use setup_timer() Muhammad Falak R Wani
2016-05-13 19:42 ` [lustre-devel] " James Simmons
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).