From patchwork Fri Sep 22 10:27:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965781 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 BBF4860381 for ; Fri, 22 Sep 2017 10:27:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B314729847 for ; Fri, 22 Sep 2017 10:27:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A76AF2984F; Fri, 22 Sep 2017 10:27:40 +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 58FBF29847 for ; Fri, 22 Sep 2017 10:27:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751931AbdIVK1j (ORCPT ); Fri, 22 Sep 2017 06:27:39 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34229 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdIVK1i (ORCPT ); Fri, 22 Sep 2017 06:27:38 -0400 Received: by mail-pf0-f193.google.com with SMTP id g65so300539pfe.1 for ; Fri, 22 Sep 2017 03:27:38 -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=eoPUmdkf1vkGrUqRClIXacIXh9ISAeoLS+Vlrl+7NMY=; b=hEZRoeR6YwbTU+LfSAJVCzXrcNJAejVUNZIZ/d3Do+amo0oJj0frKaWASSZfJLvEha HlHQRmMqT24HtwW7timmEL0/Jgu8/l2/yEyJlPtx3XZBEhak8XWfxT3Aoui7cdMthUKL jhDvrvDV981BeokLJvXAxH0HxXguKqEahUotEIiYN0/oP50pUkLsujnh+JH5WjmioS5C qIpS1MjBeq3nRwHjlxU9D7Io3+q9qV0fjFYnQ1UOenNAC2xjyCo3Sv6bmef9t3HtRFQX UCLMDi7QBXOr+PjnYhVCBvsnV4QpEvmlumlzu2vlPMxsqEQXCC4QWVvoAtJtuq3ABV4e Grvw== 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=eoPUmdkf1vkGrUqRClIXacIXh9ISAeoLS+Vlrl+7NMY=; b=DyBavq64me+2Tadsxsb/2X6L6/KdFKuaykKt5xz0JXatrZP79/IBYDcl1zVOeFlCXP XKnxUERusbTSzNOW9qpuK/H0eDIaHERctXIW+04rZHLbqodzE0SOIH6E0jnz7VH7D15M UBelKsKepqn+vaLGfHL89VlRNGhRv0um9U/HiIk/QbRs8Mjc+o7FEdwlRCZeEVq7ezBn 2nbmDMGwK5hKMIbzOpGc61vEBpV/lSNTR5PXU6Cmlr2qHrGrHG8uk2+OmaeUs+PZIyki MMvBqQHI6Xn3H4Mzs+L5r8wm1ct3eCJ4yc/yVMf0iGKP6xH/5+NqBxtMarpESfl4nAvv 3V/Q== X-Gm-Message-State: AHPjjUgSQlRdMbAmGP7M0u2wVCo6d699/V25fdSPLLBaXq88F+lLeVeo JVK0RBK1AgT8MHauLUyQjEw2bMeq X-Google-Smtp-Source: AOwi7QD5toSvaNE35YgPjh/rSnP9wAp8YBKz5TaVrAshKKrMm7muMWqRL+VX4AY2RgqC04iogbBDIA== X-Received: by 10.159.253.140 with SMTP id q12mr8685679pls.11.1506076058098; Fri, 22 Sep 2017 03:27:38 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id f74sm6143224pfa.36.2017.09.22.03.27.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:27:37 -0700 (PDT) From: Allen Pais To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, sean.hefty@intel.com, Allen Pais Subject: [PATCH 5/8] infiniband: nes: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:57:13 +0530 Message-Id: <1506076036-16496-6-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/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);