From patchwork Fri Sep 22 10:27:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965779 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B211560381 for ; Fri, 22 Sep 2017 10:27:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9891283FE for ; Fri, 22 Sep 2017 10:27:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EAF12850E; Fri, 22 Sep 2017 10:27:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5378A283FE for ; Fri, 22 Sep 2017 10:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751928AbdIVK1g (ORCPT ); Fri, 22 Sep 2017 06:27:36 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36618 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdIVK1f (ORCPT ); Fri, 22 Sep 2017 06:27:35 -0400 Received: by mail-pf0-f196.google.com with SMTP id f84so295274pfj.3 for ; Fri, 22 Sep 2017 03:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fj64Hkh+GmfVZppuvDecM+ThyFrA1DzVFw672lSfEF8=; b=LWCL3IUm3/2DEYAK5o0CC5nhTIIBIBf57UY4Q8Wf7PQtKbWrNde1HttXrnuBOmjkPW FTKdEQsHy0pLSp54VUhaMuMtkenYwSlMQ3uJ4nIS7tcZDTFY5l2hong8ev8F7wyq6C8n +mm9/nfM9v/QWUr2mEb4AIDiiMb8REUWZJ51Wh96Li9QCC2pnGp5tipMMDRGsNukAKkc ugkII/NRsBMlqcc+cBYJybPHRYn3xJQ15XlavKwionssfgzW04xDa3g8uy/dP/nGTxn9 5eb0zm+Tml83Q8qCvlhnjvnjYwS4SqW6SZoshp0npEpqhzeknVWv6EbqxlH+VNL7gr7y kFxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fj64Hkh+GmfVZppuvDecM+ThyFrA1DzVFw672lSfEF8=; b=T8YdtTzz71oWUjrq6ArlNqCwtNVPp24JGKXzY4mJunMenxvtg5qCBTEkiiuWgRgt0x DF1Pfrg4h4mx/WSM3ydMxyoRhS7CYBiLYTUni+iSoftTZDKiECum8ESC8c3rreYriOwS CWoHMMBo4FB85GRApuYuhfwAYjeZ2Bso+qQjeTQ0IYoKE74Fp4ZqUle4vee0abPMnATw ZPXLcqabcPktm+HiWpi8SGFG/Pxlb6TJMXfwVYIPTgOOXQBgGZy6TC0ZeTmHl2UX8YAC 6OrSQC+nsGkSnQqKknXbfLU3fb/0r7Thp8UYRUK49Wo8Zppe2iFIYuBtOI7i8qlbIM9k yLyw== X-Gm-Message-State: AHPjjUhDzMOR68PjcVxHJfTPHbG5zxOh1+AqwrLmiNrBb9urFvJZfhJb Ste9xsZY2b2eQL366WK/sgrEu2gz X-Google-Smtp-Source: AOwi7QDRuKD0MyM0MHvdoJVp19RYmlZJK+mHfs9LBty19Ii5J5SXR10EbJXaLIoe2O3l5bOqHGjkcg== X-Received: by 10.99.171.73 with SMTP id k9mr8786304pgp.196.1506076055190; Fri, 22 Sep 2017 03:27:35 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id f74sm6143224pfa.36.2017.09.22.03.27.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:27:34 -0700 (PDT) From: Allen Pais To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, sean.hefty@intel.com, Allen Pais Subject: [PATCH 4/8] infiniband: mthca: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:57:12 +0530 Message-Id: <1506076036-16496-5-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506076036-16496-1-git-send-email-allen.lkml@gmail.com> References: <1506076036-16496-1-git-send-email-allen.lkml@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/infiniband/hw/mthca/mthca_catas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c index f6474c2..23cc08d 100644 --- a/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/drivers/infiniband/hw/mthca/mthca_catas.c @@ -149,7 +149,7 @@ void mthca_start_catas_poll(struct mthca_dev *dev) { phys_addr_t addr; - init_timer(&dev->catas_err.timer); + setup_timer(&dev->catas_err.timer, poll_catas, (unsigned long)dev); dev->catas_err.map = NULL; addr = pci_resource_start(dev->pdev, 0) + @@ -164,8 +164,6 @@ void mthca_start_catas_poll(struct mthca_dev *dev) return; } - dev->catas_err.timer.data = (unsigned long) dev; - dev->catas_err.timer.function = poll_catas; dev->catas_err.timer.expires = jiffies + MTHCA_CATAS_POLL_INTERVAL; INIT_LIST_HEAD(&dev->catas_err.list); add_timer(&dev->catas_err.timer);