Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934067AbdCKAsD (ORCPT ); Fri, 10 Mar 2017 19:48:03 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34552 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933956AbdCKArs (ORCPT ); Fri, 10 Mar 2017 19:47:48 -0500 From: Geliang Tang To: Mark Fasheh , Joel Becker , Andrew Morton Cc: Geliang Tang , 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 Message-Id: <5e75bf07beb91e092d5aa36c36769949a480456a.1489060564.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> References: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 25 Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- 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