From: Allen Pais <allen.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
Allen Pais <allen.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 5/8] infiniband: nes: use setup_timer() helper.
Date: Fri, 22 Sep 2017 15:57:13 +0530 [thread overview]
Message-ID: <1506076036-16496-6-git-send-email-allen.lkml@gmail.com> (raw)
In-Reply-To: <1506076036-16496-1-git-send-email-allen.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/nes/nes_hw.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index b0adf65..248505f 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -598,19 +598,16 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
}
if (nesadapter->hw_rev == NE020_REV) {
- init_timer(&nesadapter->mh_timer);
- nesadapter->mh_timer.function = nes_mh_fix;
+ setup_timer(&nesadapter->mh_timer, nes_mh_fix,
+ (unsigned long)nesdev);
nesadapter->mh_timer.expires = jiffies + (HZ/5); /* 1 second */
- nesadapter->mh_timer.data = (unsigned long)nesdev;
add_timer(&nesadapter->mh_timer);
} else {
nes_write32(nesdev->regs+NES_INTF_INT_STAT, 0x0f000000);
}
- init_timer(&nesadapter->lc_timer);
- nesadapter->lc_timer.function = nes_clc;
+ setup_timer(&nesadapter->lc_timer, nes_clc, (unsigned long)nesdev);
nesadapter->lc_timer.expires = jiffies + 3600 * HZ; /* 1 hour */
- nesadapter->lc_timer.data = (unsigned long)nesdev;
add_timer(&nesadapter->lc_timer);
list_add_tail(&nesadapter->list, &nes_adapter_list);
--
2.7.4
--
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
next prev parent reply other threads:[~2017-09-22 10:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 10:27 [PATCH 0/8] use setup_timer() helper function Allen Pais
[not found] ` <1506076036-16496-1-git-send-email-allen.lkml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-22 10:27 ` [PATCH 1/8] infiniband: qib: use setup_timer() helper Allen Pais
2017-09-22 10:27 ` [PATCH 2/8] infiniband: nes: " Allen Pais
2017-09-22 10:27 ` [PATCH 3/8] infiniband: qib: " Allen Pais
2017-09-22 10:27 ` [PATCH 4/8] infiniband: mthca: " Allen Pais
2017-09-22 10:27 ` Allen Pais [this message]
2017-09-22 10:27 ` [PATCH 6/8] infiniband: qib: " Allen Pais
2017-09-22 10:27 ` [PATCH 7/8] infiniband: nes: " Allen Pais
2017-09-22 10:27 ` [PATCH 8/8] infiniband: qib: " Allen Pais
2017-09-22 17:00 ` [PATCH 0/8] use setup_timer() helper function Jason Gunthorpe
2017-09-27 13:43 ` Doug Ledford
[not found] ` <1506519781.82712.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-09-29 7:06 ` Allen
[not found] ` <CAOMdWSKD-h4y-ggh7m-_kNV+0PMJC+Nf7Bj02CF7Q6rjMtRniw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-29 15:23 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1506076036-16496-6-git-send-email-allen.lkml@gmail.com \
--to=allen.lkml-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox