From patchwork Fri Sep 22 09:51:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 9965711 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 81926600C5 for ; Fri, 22 Sep 2017 09:52:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 808CA2982C for ; Fri, 22 Sep 2017 09:52:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73D642983F; Fri, 22 Sep 2017 09:52:29 +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=-3.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,RCVD_IN_SORBS_WEB autolearn=ham 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 1E0112982C for ; Fri, 22 Sep 2017 09:52:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752146AbdIVJw2 (ORCPT ); Fri, 22 Sep 2017 05:52:28 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35154 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbdIVJw1 (ORCPT ); Fri, 22 Sep 2017 05:52:27 -0400 Received: by mail-pg0-f68.google.com with SMTP id j16so366645pga.2 for ; Fri, 22 Sep 2017 02:52:27 -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=6Q2GrcdcMG+HGEoCUazJghEGiPBlRZCY26Yn0z292/c=; b=YVou84lKMFla4ZHZ7LiyqCNrOelhWEO2gvp2uWeKv/hBfuXgTNDdaj5vOt8fe4mi23 HZjGOv496WrRKaQs7XFKtmRTf7sEJEYLv0s1kwcqvbntPYUUHq8AjJ5PisA1nstDBSlH JUkxz7+YGVdpZHpqUIKBIvfWZJlhynI6aCEmbv5AhVPEvHutKCvAh1mJ7myM7nU4q5k7 mGeeuHCriDweXM8NwhfgxV4tzwQDjCaFB7kaoyoph65utCe+NOv6/RBERWEHor1mdX2Y l/v3+sP7GKrxmEy7fLAUFE6v8FS8MbqaafvAhbmxOyHhQKZDYXa62S2/s4XkKdGNzOIh xELQ== 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=6Q2GrcdcMG+HGEoCUazJghEGiPBlRZCY26Yn0z292/c=; b=kCTVOnY33VofOjZ155Jv4OHKxg8kEqjqbJLNa+Fd9dtj8LH3uqW6+Es5N7XdKQ88qi wvmQQu8xEFNbVahEet2wPdDoj3O+SqGxHnDDRyUPk2Qs6McfYDFddVrLNXs/Jfo33lPJ t08i+SlQRmHyWbUwGZoGf15z2W+y1XYYcJr2ShGM6Jo83HDi9ilG9M4SXK/W8NrpUpAo gBe9pWWFEOWvqyeSgZbwZdU3J3oPQ5WA8Zuqomu1gq46pBpz8OEI6ADvIOHCKCtYlGYs S+MH+UiRhhensY5QvQv1PRsA24CHn6FuZenrgfSZYVWeUlPmKTPq1SX48U9RTR33uyin DQ+g== X-Gm-Message-State: AHPjjUiN1syhYdJ0miL2a7HwQhXvuLTG342cgI8VY2oPMDf0JVHaeEWh hSDKjgYqw6n8kEOyWrU9WxTiN2QE X-Google-Smtp-Source: AOwi7QA26pEVw2YK8qKWs0NhHW18bStKZeQMv5kAzXNCyIzytHGtfj8uzXSqjkP06QoIflaQtTQBtQ== X-Received: by 10.98.101.4 with SMTP id z4mr8684967pfb.6.1506073947148; Fri, 22 Sep 2017 02:52:27 -0700 (PDT) Received: from localhost.localdomain ([103.42.74.194]) by smtp.gmail.com with ESMTPSA id k13sm5611977pgo.51.2017.09.22.02.52.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 02:52:26 -0700 (PDT) From: Allen Pais To: linux-scsi@vger.kernel.org Cc: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux@armlinux.org.uk, oliver@neukum.org, aliakc@web.de, lenehan@twibble.org, lduncan@suse.com, cleech@redhat.com, matthew@wil.cx, Allen Pais Subject: [PATCH 07/13] scsi: qla4xxx: use setup_timer() helper. Date: Fri, 22 Sep 2017 15:21:39 +0530 Message-Id: <1506073905-12985-8-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506073905-12985-1-git-send-email-allen.lkml@gmail.com> References: <1506073905-12985-1-git-send-email-allen.lkml@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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/scsi/qla4xxx/ql4_os.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 64c6fa5..32b3e0e 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -3961,10 +3961,9 @@ static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func, { DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n", __func__, ha->host->host_no)); - init_timer(&ha->timer); + setup_timer(&ha->timer, (void(*)(unsigned long))func, + (unsigned long)ha); ha->timer.expires = jiffies + interval * HZ; - ha->timer.data = (unsigned long)ha; - ha->timer.function = (void (*)(unsigned long))func; add_timer(&ha->timer); ha->timer_active = 1; }