From patchwork Fri Sep 22 10:27:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965783 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 DA00A60381 for ; Fri, 22 Sep 2017 10:27:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D198029847 for ; Fri, 22 Sep 2017 10:27:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C59432984F; Fri, 22 Sep 2017 10:27:43 +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 84B6629847 for ; Fri, 22 Sep 2017 10:27:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751933AbdIVK1m (ORCPT ); Fri, 22 Sep 2017 06:27:42 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34595 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdIVK1m (ORCPT ); Fri, 22 Sep 2017 06:27:42 -0400 Received: by mail-pg0-f67.google.com with SMTP id u18so412780pgo.1 for ; Fri, 22 Sep 2017 03:27:42 -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=ZtAaOg36X7xyngKwgheWcebOdZkdVdH1F+GDJQvbDtA=; b=aOm07O9ftYG3U2eSlqAxB5YwLAi1jL/Ai9HAff+Ig9xF6o5ESrN6ic5S+UPUrzurNK R6N+Jp1dadq1RJRwrCtB/duLIlj9CIPqRTqkVtk9qYvxAB0L1wi8Wp30AlDUvqJEMLWY 51J42m3n2qWYAeR9V8VmjkU5qDcdepyFwsxZc2IOPqcss01ogjgRx405aH0BX1nBK4wU t8FTb6vFGqcL2NxFWqnlRBLhPljn2ssgtAiAv2ZnfoT9RDykJqU0dJ5jDj8mSj2Z44sg Efmyxp6Rk4gucm/4aCT139/SmapVYTBXwzdVlfjjTvB3V2lmzG1OLzqhC1EBIUZNclNp hKyw== 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=ZtAaOg36X7xyngKwgheWcebOdZkdVdH1F+GDJQvbDtA=; b=SGRJm6MQb0xk+OfpYNHVQn0A1gsIt4LGJdLBj/tkOV7Qfq/yNG5Psz0fFRF7IytK48 yF06acwSM8y4vDaWtEwoqQYlEhs/WJh5gNCkP1mJXE6tcf1/YqXX6NmYhTILiz5yPB+P zzdCQ9b/lSMPgxhHc0dX7GWZMcjvBEsqp8sSOzBvf4LM504LfVcKP5zg5VV1KDniod8/ bGsUxpuoQRvsZxGJcA5iujJ3fr8wPKd2HZBkmt2C8NcP2yqwGGUGaklXv3F2iv3/wvGR sHIHL22q8iCG3FXxq/Lh9wYkH4JTEcRIBSKYBR5RLjQk65ULpq93p4h7/oMBl5F6W21C 2Dxg== X-Gm-Message-State: AHPjjUgQMIybwLy9cV63oFIYZ9GU5oJ05GA9vyYZ5PjXMUUoSB4u6MgM l2LW04LLYlb0XliGVPabDCd/zcjg X-Google-Smtp-Source: AOwi7QDwxj/UIPb5YHKk9uRXuTRhYDDYCw4U8RRhyBtKrY55wAiEbej8pSCspIeC1EnNo/wuXrNUAQ== X-Received: by 10.99.109.65 with SMTP id i62mr8630707pgc.83.1506076061442; Fri, 22 Sep 2017 03:27:41 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id f74sm6143224pfa.36.2017.09.22.03.27.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 03:27:39 -0700 (PDT) From: Allen Pais To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, sean.hefty@intel.com, Allen Pais Subject: [PATCH 6/8] infiniband: qib: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:57:14 +0530 Message-Id: <1506076036-16496-7-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_driver.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_driver.c b/drivers/infiniband/hw/qib/qib_driver.c index 719906a..6dfcc4f 100644 --- a/drivers/infiniband/hw/qib/qib_driver.c +++ b/drivers/infiniband/hw/qib/qib_driver.c @@ -735,9 +735,8 @@ void qib_set_led_override(struct qib_pportdata *ppd, unsigned int val) */ if (atomic_inc_return(&ppd->led_override_timer_active) == 1) { /* Need to start timer */ - init_timer(&ppd->led_override_timer); - ppd->led_override_timer.function = qib_run_led_override; - ppd->led_override_timer.data = (unsigned long) ppd; + setup_timer(&ppd->led_override_timer, qib_run_led_override, + (unsigned long)ppd); ppd->led_override_timer.expires = jiffies + 1; add_timer(&ppd->led_override_timer); } else {