public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rdma: use setup_timer() api
@ 2016-02-04 13:22 Gujulan Elango, Hari Prasath (H.)
  2016-02-04 15:38 ` Marciniszyn, Mike
  0 siblings, 1 reply; 3+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2016-02-04 13:22 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, hal.rosenstock@gmail.com,
	infinipath@intel.com, jgunthorpe@obsidianresearch.com,
	ira.weiny@intel.com, sagig@mellanox.com
  Cc: swise@opengridcomputing.com, matanb@mellanox.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org

From: Hari Prasath Gujulan Elango <hgujulan@visteon.com>

Date: Thu, 4 Feb 2016 18:46:31 +0530
Replace the timer API's to initialize a timer & then assign the callback
function by the setup_timer() API.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
---
 drivers/staging/rdma/ehca/ehca_main.c | 3 +--
 drivers/staging/rdma/hfi1/verbs.c     | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rdma/ehca/ehca_main.c b/drivers/staging/rdma/ehca/ehca_main.c
index 832f22f..e545712 100644
--- a/drivers/staging/rdma/ehca/ehca_main.c
+++ b/drivers/staging/rdma/ehca/ehca_main.c
@@ -1073,8 +1073,7 @@ static int __init ehca_module_init(void)
 		ehca_gen_err("WARNING!!!");
 		ehca_gen_err("It is possible to lose interrupts.");
 	} else {
-		init_timer(&poll_eqs_timer);
-		poll_eqs_timer.function = ehca_poll_eqs;
+		setup_timer(&poll_eqs_timer, ehca_poll_eqs, 0UL);
 		poll_eqs_timer.expires = jiffies + HZ;
 		add_timer(&poll_eqs_timer);
 	}
diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c
index 09b8d41..769388d 100644
--- a/drivers/staging/rdma/hfi1/verbs.c
+++ b/drivers/staging/rdma/hfi1/verbs.c
@@ -1926,8 +1926,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
 	spin_lock_init(&dev->n_qps_lock);
 	spin_lock_init(&dev->n_srqs_lock);
 	spin_lock_init(&dev->n_mcast_grps_lock);
-	init_timer(&dev->mem_timer);
-	dev->mem_timer.function = mem_timer;
+	setup_timer(&dev->mem_timer, mem_timer, 0UL);
 	dev->mem_timer.data = (unsigned long) dev;
 
 	/*
-- 
1.9.1

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

* RE: [PATCH] staging: rdma: use setup_timer() api
  2016-02-04 13:22 [PATCH] staging: rdma: use setup_timer() api Gujulan Elango, Hari Prasath (H.)
@ 2016-02-04 15:38 ` Marciniszyn, Mike
       [not found]   ` <32E1700B9017364D9B60AED9960492BC25A05B89-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Marciniszyn, Mike @ 2016-02-04 15:38 UTC (permalink / raw)
  To: Doug Ledford
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Gujulan Elango, Hari Prasath (H.), Weiny, Ira,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org

> Subject: [PATCH] staging: rdma: use setup_timer() api
> 
> From: Hari Prasath Gujulan Elango <hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org>
> 

Doug,

We are going to add this to the rdmavt/hfi1/qib work, with the appropriate authorship credit.   Otherwise, there will certainly be conflicts.

Hari,

Note that ehca is going away.

In addition,  you missed exploiting the third argument to setup_timer() for the callback context.

Mike
--
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	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: rdma: use setup_timer() api
       [not found]   ` <32E1700B9017364D9B60AED9960492BC25A05B89-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2016-02-04 17:32     ` ira.weiny
  0 siblings, 0 replies; 3+ messages in thread
From: ira.weiny @ 2016-02-04 17:32 UTC (permalink / raw)
  To: Marciniszyn, Mike
  Cc: Doug Ledford,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Gujulan Elango, Hari Prasath (H.),
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org

On Thu, Feb 04, 2016 at 09:38:32AM -0600, Mike Marciniszyn wrote:
> > Subject: [PATCH] staging: rdma: use setup_timer() api
> > 
> > From: Hari Prasath Gujulan Elango <hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org>
> > 
> 
> Doug,
> 
> We are going to add this to the rdmavt/hfi1/qib work, with the appropriate authorship credit.   Otherwise, there will certainly be conflicts.
> 
> Hari,
> 
> Note that ehca is going away.

Actually ehca is already gone.  From Dougs for-4.5-rc tree.

12:30:25 > ls
Kconfig  Makefile  hfi1/

Ira

> 
> In addition,  you missed exploiting the third argument to setup_timer() for the callback context.
> 
> Mike
--
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	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-04 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 13:22 [PATCH] staging: rdma: use setup_timer() api Gujulan Elango, Hari Prasath (H.)
2016-02-04 15:38 ` Marciniszyn, Mike
     [not found]   ` <32E1700B9017364D9B60AED9960492BC25A05B89-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-02-04 17:32     ` ira.weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox