From patchwork Wed Oct 4 23:27:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9985919 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 CC76D602B8 for ; Wed, 4 Oct 2017 23:31:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE71726E96 for ; Wed, 4 Oct 2017 23:31:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B207928C21; Wed, 4 Oct 2017 23:31:32 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM 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 33B9C26E96 for ; Wed, 4 Oct 2017 23:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbdJDXba (ORCPT ); Wed, 4 Oct 2017 19:31:30 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:47494 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbdJDX2F (ORCPT ); Wed, 4 Oct 2017 19:28:05 -0400 Received: by mail-pf0-f180.google.com with SMTP id u12so7044953pfl.4 for ; Wed, 04 Oct 2017 16:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BddrgKn31CpUTm0zCt4HsSBbX2xA8RuRn6feEHDmkJU=; b=edZ7Gqlo5CbT2/YHiDw3oNzCeKNS9SYrtSpKPx782ZlOCi5TplHxicDWy9NmXsHk56 +zgRe1YnRpYztDqnJnw/YyyPp3y1p+xmyGjksWT+JzyvTuSRNaspcc5N8PWLr4qa4gk/ iJvsF9R1TRJeV9vQV8Kn1lFm5CyNW0Q3kPQhE= 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=BddrgKn31CpUTm0zCt4HsSBbX2xA8RuRn6feEHDmkJU=; b=XdSAuvwhWfufZ9YJGRlJHg9mmNSBDUOt/LSskYhrhwEKVQIiWWd+b/dLdGanzSvHcU xdkVNPDjyYKB2h3ZbjoSWS+l6i6dYozH24wYWViEvh1ubXPfkAfFdc5ASAyozE6HzXv2 5dVxz6bT8F0oUE88RmGXz+s6F7XVm4gUHHB8VIjxBQULvjrZx+f4Dj/qS35lacdp4kbU U4cElajnJmohbcCilf5VMGZBBggUQsSej9AvJHddwL01cuYA2EEaXOWFPm7O8QyOESSF KoBUR5DGO1OzZvBAZp8SeYPCT1HKBo4Qdp0mt73gop6+R3pzl70zbG3QX6S1qePQXCVa 9gYA== X-Gm-Message-State: AMCzsaX2m+n8fcsJ+FlawgRW67f9NzR1rDgpK65Fbjal5RVtJffkr30Q qpLb6/QC82PUTyxs8kAmqvYaUQ== X-Google-Smtp-Source: AOwi7QBk3SsXS7BnmvPyZvdJtWCOyHHVv8pmxn+ic6k3gJwYvubxFE2RE5SPY2c/hl/3PKPrZzAMtA== X-Received: by 10.99.163.97 with SMTP id v33mr14451531pgn.206.1507159684527; Wed, 04 Oct 2017 16:28: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 r68sm26296107pfi.7.2017.10.04.16.27.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 16:27:57 -0700 (PDT) From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , Ralf Baechle , Wim Van Sebroeck , Guenter Roeck , Geert Uytterhoeven , linux-mips@linux-mips.org, linux-watchdog@vger.kernel.org, Andrew Morton , Arnd Bergmann , Benjamin Herrenschmidt , Chris Metcalf , Greg Kroah-Hartman , Harish Patil , Heiko Carstens , "James E.J. Bottomley" , John Stultz , Julian Wiedmann , Kalle Valo , Lai Jiangshan , Len Brown , Manish Chopra , Mark Gross , "Martin K. Petersen" , Martin Schwidefsky , Michael Ellerman , Michael Reed , netdev@vger.kernel.org, Oleg Nesterov , Paul Mackerras , Pavel Machek , Petr Mladek , "Rafael J. Wysocki" , Sebastian Reichel , Stefan Richter , Stephen Boyd , Sudip Mukherjee , Tejun Heo , Ursula Braun , Viresh Kumar , linux1394-devel@lists.sourceforge.net, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/13] timer: Remove users of expire and data arguments to DEFINE_TIMER Date: Wed, 4 Oct 2017 16:27:03 -0700 Message-Id: <1507159627-127660-10-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org> References: <1507159627-127660-1-git-send-email-keescook@chromium.org> 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 The expire and data arguments of DEFINE_TIMER are only used in two places and are ignored by the code (malta-display.c only uses mod_timer(), never add_timer(), so the preset expires value is ignored). Set both sets of arguments to zero. Cc: Ralf Baechle Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Geert Uytterhoeven Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Guenter Roeck Acked-by: Ralf Baechle --- arch/mips/mti-malta/malta-display.c | 6 +++--- drivers/watchdog/alim7101_wdt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c index d4f807191ecd..ac813158b9b8 100644 --- a/arch/mips/mti-malta/malta-display.c +++ b/arch/mips/mti-malta/malta-display.c @@ -36,10 +36,10 @@ void mips_display_message(const char *str) } } -static void scroll_display_message(unsigned long data); -static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); +static void scroll_display_message(unsigned long unused); +static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, 0, 0); -static void scroll_display_message(unsigned long data) +static void scroll_display_message(unsigned long unused) { mips_display_message(&display_string[display_count++]); if (display_count == max_display_count) diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c index 665e0e7dfe1e..3c1f6ac68ea9 100644 --- a/drivers/watchdog/alim7101_wdt.c +++ b/drivers/watchdog/alim7101_wdt.c @@ -71,7 +71,7 @@ MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog (required by old cobalt boards)."); static void wdt_timer_ping(unsigned long); -static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1); +static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0); static unsigned long next_heartbeat; static unsigned long wdt_is_open; static char wdt_expect_close; @@ -87,7 +87,7 @@ MODULE_PARM_DESC(nowayout, * Whack the dog */ -static void wdt_timer_ping(unsigned long data) +static void wdt_timer_ping(unsigned long unused) { /* If we got a heartbeat pulse within the WDT_US_INTERVAL * we agree to ping the WDT