Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754730AbdCaI2H (ORCPT ); Fri, 31 Mar 2017 04:28:07 -0400 Received: from terminus.zytor.com ([65.50.211.136]:47231 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbdCaI2E (ORCPT ); Fri, 31 Mar 2017 04:28:04 -0400 Date: Fri, 31 Mar 2017 01:24:51 -0700 From: tip-bot for Geliang Tang Message-ID: Cc: mulix@mulix.org, hpa@zytor.com, mingo@kernel.org, jdmason@kudzu.us, linux-kernel@vger.kernel.org, tglx@linutronix.de, geliangtang@gmail.com Reply-To: mulix@mulix.org, hpa@zytor.com, mingo@kernel.org, jdmason@kudzu.us, geliangtang@gmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cleanups] x86/pci-calgary: Use setup_timer() instead of open coding it. Git-Commit-ID: 352ef03ca0ad07156bcee6e244c2df6f1a19bb05 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 38 Commit-ID: 352ef03ca0ad07156bcee6e244c2df6f1a19bb05 Gitweb: http://git.kernel.org/tip/352ef03ca0ad07156bcee6e244c2df6f1a19bb05 Author: Geliang Tang AuthorDate: Fri, 24 Mar 2017 22:15:14 +0800 Committer: Thomas Gleixner CommitDate: Fri, 31 Mar 2017 10:21:04 +0200 x86/pci-calgary: Use setup_timer() instead of open coding it. Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Cc: iommu@lists.linux-foundation.org Cc: Jon Mason Cc: Muli Ben-Yehuda Link: http://lkml.kernel.org/r/e4f1888b9e4a87f6a6345f86ed23071483763b22.1490340972.git.geliangtang@gmail.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/pci-calgary_64.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 0c150c0..fda7867 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c @@ -1007,9 +1007,8 @@ static void __init calgary_enable_translation(struct pci_dev *dev) writel(cpu_to_be32(val32), target); readl(target); /* flush */ - init_timer(&tbl->watchdog_timer); - tbl->watchdog_timer.function = &calgary_watchdog; - tbl->watchdog_timer.data = (unsigned long)dev; + setup_timer(&tbl->watchdog_timer, &calgary_watchdog, + (unsigned long)dev); mod_timer(&tbl->watchdog_timer, jiffies); }