From patchwork Mon Oct 16 23:55:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10010281 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 EE055600CC for ; Mon, 16 Oct 2017 23:55:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E02A528713 for ; Mon, 16 Oct 2017 23:55:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D448528715; Mon, 16 Oct 2017 23:55:21 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable 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 7C8A328713 for ; Mon, 16 Oct 2017 23:55:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757578AbdJPXzH (ORCPT ); Mon, 16 Oct 2017 19:55:07 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:43829 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756359AbdJPXzF (ORCPT ); Mon, 16 Oct 2017 19:55:05 -0400 Received: by mail-pf0-f176.google.com with SMTP id a8so16519132pfc.0 for ; Mon, 16 Oct 2017 16:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=8qikuoOr3ElE+X7fn9gauIoM4XntbgB4hDn/1zGYgEE=; b=nB4IUGBGBcvMJNvmM/Y9lpRBah4j3mHt3+yObPJcRV7EaYuUv2WycAb/jRf7StxSnw NnmomOd2Yk+7Svcsc7wGJIoskINYjCGl6DRo9GAmaEX5nhRTufsYj2ULsvnrft1oIGie PwIQQSiwvh83q0EwSytNPWnFAyl/bOcwZGuZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=8qikuoOr3ElE+X7fn9gauIoM4XntbgB4hDn/1zGYgEE=; b=tZKdKGEY9QpdXDZWBDbDvDbz0TWUrcxiTeyC1cqKHe3DqIFVbRgrxVfgeJSkUSp4rc OfXO7wz03wUyxxggH3jm5rjvuIWsEUd1Lbs3d8vRSEf17WStw/CG95mkIpqybzo1tCxD ZdVmBUcZ0V++gowSIGTP3AiqjaBo4Z0lpO7cLcmwH0Yqj917SFjz80o5DC0CMgMoP1/C acZirsyikYXWwFNPbCxzx0kwArzqAbaX53QY3/5pAUCAepviaOedBAeuDaHSZRqlb6S/ N3YRs7OzAo3Jgn2cydMbnsRFLxf0nTW63aw6yDLTvW7peVpwoX22Wq9Vzx1wX6Q79f4L HJFA== X-Gm-Message-State: AMCzsaWKpsMa1r5prSUaOUibB1xYMpF8WRWOhX16P5Xtu860TDW30ajq ZGuqTYMzJ7hJMtwCv5VV5MsQgx7k22Y= X-Google-Smtp-Source: ABhQp+Q14Hsa6+2Hl9cOTMeWfG0j1YvHPelDkMq260yolDuAjuToyI4SnkaZTjGlPEOyTY0eSh+Ffw== X-Received: by 10.159.229.203 with SMTP id t11mr2579892plq.190.1508198104790; Mon, 16 Oct 2017 16:55:04 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id u188sm7276856pfb.188.2017.10.16.16.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 16:55:03 -0700 (PDT) Date: Mon, 16 Oct 2017 16:55:02 -0700 From: Kees Cook To: "Martin K. Petersen" Cc: Achim Leubner , "James E.J. Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: gdth: Convert timers to use timer_setup() Message-ID: <20171016235502.GA102608@beast> MIME-Version: 1.0 Content-Disposition: inline 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 In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Achim Leubner Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen --- drivers/scsi/gdth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index a4473356a9dc..c35f05c4c6bb 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -3705,7 +3705,7 @@ static void gdth_log_event(gdth_evt_data *dvr, char *buffer) #ifdef GDTH_STATISTICS static u8 gdth_timer_running; -static void gdth_timeout(unsigned long data) +static void gdth_timeout(struct timer_list *unused) { u32 i; Scsi_Cmnd *nscp; @@ -3743,8 +3743,6 @@ static void gdth_timer_init(void) gdth_timer_running = 1; TRACE2(("gdth_detect(): Initializing timer !\n")); gdth_timer.expires = jiffies + HZ; - gdth_timer.data = 0L; - gdth_timer.function = gdth_timeout; add_timer(&gdth_timer); } #else @@ -5165,7 +5163,7 @@ static int __init gdth_init(void) /* initializations */ gdth_polling = TRUE; gdth_clear_events(); - init_timer(&gdth_timer); + timer_setup(&gdth_timer, gdth_timeout, 0); /* As default we do not probe for EISA or ISA controllers */ if (probe_eisa_isa) {