diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-04 17:45:54 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-09 12:19:41 -0400 |
commit | 6d290d69ac52b3b311d2ef0da4825dc6f1ea8997 (patch) | |
tree | 232df624f76d9b411d916e866612c772d6b85050 /drivers/infiniband/ulp/ipoib/ipoib_ib.c | |
parent | 605cbb2c443f68b1eb74e4cfdf6c15d7d965f00a (diff) | |
download | linux-6d290d69ac52b3b311d2ef0da4825dc6f1ea8997.tar.bz2 |
IB/ipoib: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Doug Ledford <dledford@redhat.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Alex Vesker <valex@mellanox.com>
Cc: Erez Shitrit <erezsh@mellanox.com>
Cc: Zhu Yanjun <yanjun.zhu@oracle.com>
Cc: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Yuval Shaia <yuval.shaia@oracle.com>
Cc: linux-rdma@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 6cd61638b441..918930a0bc70 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -821,9 +821,11 @@ int ipoib_ib_dev_stop(struct net_device *dev) return 0; } -void ipoib_ib_tx_timer_func(unsigned long ctx) +void ipoib_ib_tx_timer_func(struct timer_list *t) { - drain_tx_cq((struct net_device *)ctx); + struct ipoib_dev_priv *priv = from_timer(priv, t, poll_timer); + + drain_tx_cq(priv->dev); } int ipoib_ib_dev_open_default(struct net_device *dev) |