From patchwork Fri Sep 22 10:27:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965787 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 ED04260381 for ; Fri, 22 Sep 2017 10:27:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E461B2984E for ; Fri, 22 Sep 2017 10:27:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D963829850; Fri, 22 Sep 2017 10:27:49 +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 A0B952984E for ; Fri, 22 Sep 2017 10:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbdIVK1s (ORCPT ); Fri, 22 Sep 2017 06:27:48 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37787 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdIVK1s (ORCPT ); Fri, 22 Sep 2017 06:27:48 -0400 Received: by mail-pg0-f66.google.com with SMTP id v5so403218pgn.4 for ; Fri, 22 Sep 2017 03:27:48 -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=Mi7MS/qpe+TMuDOV9TaO5LzTDM4YshxYTAh2xxAWczo=; b=aey1hm45TabqmFdn7F+PWaVknfqbUG9Hbc8PEIiZpD8qR4Z69cQlGGmqwldX3n16ou /AQy33iyoNsV/Dsxy+mtzCOkxOJpPYFf8hMu19CJs7A42gyVjef1INzFj81w9S6LjhCu kOOZ4aPblLxQJTxu6pKDa/aQxHwfBG8Oleq8gON+PSK+OJI7rpQNYkdlFhGtmmFc/Bpv G5Mw0h++gI7GhflZeEw2It5PcBbUeAbas2+cYjcrECfUk0d36R81UfHgu9A/a/BSBJsy eAT8Q3Wk+GWFHpAv9aibU9iyqftQC2IIKCLAfzbqj9x1objM2iw57UvefvkPXVUjlwAY lP6Q== 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=Mi7MS/qpe+TMuDOV9TaO5LzTDM4YshxYTAh2xxAWczo=; b=pojMdesVoJwTd/4KrSn/kzedAlBChw+Qpb5thjFm2sfzXdVMsPzdmAw1sn5QsKFDYw wGxT7r2LZeHK7pWea76t7/TrmuDDvEhPKCRA+seKKVG7WEZkP15lAQOiImJWhtmC7LEB hUNn6LOZUAnjDrHCTjzw/EBol0sZqp1Vw09XAKtNixFq4NGNvUvtfZh/kMUIrW6xk2NA MFPNof1D5ny61BUXFsrlSQkBQ3RHXkX4qOhj1tAgdf7md+lfKdroE6jzTAK9oPXtTbuo bPk67Z8Ma4By7W8kqlfzcdKnNMWZWYPK9fXeE0FpaGZr3SO8qiWaLSUIctFUceGRGB2n G2Jg== X-Gm-Message-State: AHPjjUgxsBc81YnP/+FCv55Hj48sQxvLgDAurQWZYEzp/p1/l7WHgfIW WpG2ww6bjGSF4F8fklnFxrSqzJ0d X-Google-Smtp-Source: AOwi7QB7e44qn8g6oXOp1DCZsibGfTArOjxgb5NcezyfCcRU+S78pf28z1QyzcJuqS7heq0MDOND7w== X-Received: by 10.84.253.23 with SMTP id z23mr8550293pll.210.1506076067435; Fri, 22 Sep 2017 03:27:47 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id f74sm6143224pfa.36.2017.09.22.03.27.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:27:46 -0700 (PDT) From: Allen Pais To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, sean.hefty@intel.com, Allen Pais Subject: [PATCH 8/8] infiniband: qib: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:57:16 +0530 Message-Id: <1506076036-16496-9-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/qib/qib_mad.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 82d9da9..f3d4511 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -2478,10 +2478,9 @@ void qib_notify_create_mad_agent(struct rvt_dev_info *rdi, int port_idx) /* Initialize xmit_wait structure */ dd->pport[port_idx].cong_stats.counter = 0; - init_timer(&dd->pport[port_idx].cong_stats.timer); - dd->pport[port_idx].cong_stats.timer.function = xmit_wait_timer_func; - dd->pport[port_idx].cong_stats.timer.data = - (unsigned long)(&dd->pport[port_idx]); + setup_timer(&dd->pport[port_idx].cong_stats.timer, + xmit_wait_timer_func, + (unsigned long)(&dd->pport[port_idx])); dd->pport[port_idx].cong_stats.timer.expires = 0; add_timer(&dd->pport[port_idx].cong_stats.timer); }