All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] staging: rdma: ipath: Use setup_timer
@ 2015-10-24  2:19 Muhammad Falak R Wani
  2015-10-25  1:59   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Muhammad Falak R Wani @ 2015-10-24  2:19 UTC (permalink / raw)
  To: Mike Marciniszyn, Doug Ledford, Sean Hefty, Hal Rosenstock,
	Greg Kroah-Hartman, linux-rdma, devel, linux-kernel
  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@gmail.com>
---
 drivers/staging/rdma/ipath/ipath_driver.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rdma/ipath/ipath_driver.c b/drivers/staging/rdma/ipath/ipath_driver.c
index 46d9898..577704a 100644
--- a/drivers/staging/rdma/ipath/ipath_driver.c
+++ b/drivers/staging/rdma/ipath/ipath_driver.c
@@ -2307,10 +2307,9 @@ void ipath_set_led_override(struct ipath_devdata *dd, unsigned int val)
 	 */
 	if (atomic_inc_return(&dd->ipath_led_override_timer_active) == 1) {
 		/* Need to start timer */
-		init_timer(&dd->ipath_led_override_timer);
-		dd->ipath_led_override_timer.function =
-						 ipath_run_led_override;
-		dd->ipath_led_override_timer.data = (unsigned long) dd;
+		setup_timer(&dd->ipath_led_override_timer,
+				ipath_run_led_override, (unsigned long)dd);
+
 		dd->ipath_led_override_timer.expires = jiffies + 1;
 		add_timer(&dd->ipath_led_override_timer);
 	} else
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] staging: rdma: ipath: Use setup_timer
  2015-10-24  2:19 [PATCH 1/4] staging: rdma: ipath: Use setup_timer Muhammad Falak R Wani
@ 2015-10-25  1:59   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-25  1:59 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:49:28AM +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/ipath/ipath_driver.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

You sent me 4 patches all with the same subject :(

Please fix this up and resend.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/4] staging: rdma: ipath: Use setup_timer
@ 2015-10-25  1:59   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2015-10-25  1:59 UTC (permalink / raw)
  To: Muhammad Falak R Wani
  Cc: Mike Marciniszyn, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma, devel, linux-kernel

On Sat, Oct 24, 2015 at 07:49:28AM +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/ipath/ipath_driver.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

You sent me 4 patches all with the same subject :(

Please fix this up and resend.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-25  8:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-24  2:19 [PATCH 1/4] staging: rdma: ipath: Use setup_timer Muhammad Falak R Wani
2015-10-25  1:59 ` Greg Kroah-Hartman
2015-10-25  1:59   ` Greg Kroah-Hartman

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.