mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Mark Fasheh <mfasheh@versity.com>,
	Joel Becker <jlbec@evilplan.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Geliang Tang <geliangtang@gmail.com>,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/ocfs2/cluster: use setup_timer
Date: Sat, 11 Mar 2017 08:47:00 +0800	[thread overview]
Message-ID: <5e75bf07beb91e092d5aa36c36769949a480456a.1489060564.git.geliangtang@gmail.com> (raw)
In-Reply-To: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com>

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 fs/ocfs2/cluster/tcp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 4348027..de51b23 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -450,9 +450,8 @@ static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
 	INIT_WORK(&sc->sc_shutdown_work, o2net_shutdown_sc);
 	INIT_DELAYED_WORK(&sc->sc_keepalive_work, o2net_sc_send_keep_req);
 
-	init_timer(&sc->sc_idle_timeout);
-	sc->sc_idle_timeout.function = o2net_idle_timer;
-	sc->sc_idle_timeout.data = (unsigned long)sc;
+	setup_timer(&sc->sc_idle_timeout, o2net_idle_timer,
+		    (unsigned long)sc);
 
 	sclog(sc, "alloced\n");
 
-- 
2.9.3

  parent reply	other threads:[~2017-03-11  0:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-11  0:46 [PATCH] ACPI / APEI: use setup_deferrable_timer Geliang Tang
2017-03-11  0:46 ` [PATCH] ambassador: use setup_timer Geliang Tang
2017-03-13  6:47   ` David Miller
2017-03-11  0:46 ` [PATCH] auxdisplay: " Geliang Tang
2017-03-13 17:27   ` Paul Burton
2017-03-11  0:46 ` [PATCH] Bluetooth: bluecard: " Geliang Tang
2017-03-27 14:11   ` Marcel Holtmann
2017-03-11  0:46 ` [PATCH] drop_monitor: " Geliang Tang
2017-03-13  6:47   ` David Miller
2017-03-11  0:47 ` Geliang Tang [this message]
2017-03-11  0:47 ` [PATCH] libata: use setup_deferrable_timer Geliang Tang
2017-03-13 17:07   ` Tejun Heo
2017-03-14 18:06 ` [PATCH] ACPI / APEI: " Baicar, Tyler
2017-04-18 14:41 ` Rafael J. Wysocki
2017-04-18 17:21   ` Borislav Petkov
2017-04-19 10:09 ` [tip:ras/core] ACPI/APEI: Use setup_deferrable_timer() tip-bot for Geliang Tang

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=5e75bf07beb91e092d5aa36c36769949a480456a.1489060564.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@versity.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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

all inboxes | Powered by JetHome®