From patchwork Mon Aug 9 16:20:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ahmad Fatoum X-Patchwork-Id: 494200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2C69C432BE for ; Mon, 9 Aug 2021 16:21:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8D4A60F56 for ; Mon, 9 Aug 2021 16:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233130AbhHIQWA (ORCPT ); Mon, 9 Aug 2021 12:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbhHIQVq (ORCPT ); Mon, 9 Aug 2021 12:21:46 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6800EC061798 for ; Mon, 9 Aug 2021 09:21:10 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD816-00021Y-B9; Mon, 09 Aug 2021 18:20:44 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mD814-0008Ka-SA; Mon, 09 Aug 2021 18:20:42 +0200 From: Ahmad Fatoum To: Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de, Ahmad Fatoum Subject: [PATCH v5 2/7] watchdog: f71808e_wdt: remove superfluous global Date: Mon, 9 Aug 2021 18:20:32 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: afa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-watchdog@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org max_timeout never served any purpose over WATCHDOG_MAX_TIMEOUT, which it was initialized with. Drop it. Suggested-by: Guenter Roeck Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck --- drivers/watchdog/f71808e_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index f7d82d261913..3a0b29cb5854 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -81,7 +81,6 @@ static unsigned short force_id; module_param(force_id, ushort, 0); MODULE_PARM_DESC(force_id, "Override the detected device ID"); -static const int max_timeout = WATCHDOG_MAX_TIMEOUT; static int timeout = WATCHDOG_TIMEOUT; /* default timeout in seconds */ module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, @@ -221,7 +220,7 @@ static inline void superio_exit(int base) static int watchdog_set_timeout(int timeout) { if (timeout <= 0 - || timeout > max_timeout) { + || timeout > WATCHDOG_MAX_TIMEOUT) { pr_err("watchdog timeout out of range\n"); return -EINVAL; } @@ -720,7 +719,7 @@ static int __init watchdog_init(int sioaddr) if (start_withtimeout) { if (start_withtimeout <= 0 - || start_withtimeout > max_timeout) { + || start_withtimeout > WATCHDOG_MAX_TIMEOUT) { pr_err("starting timeout out of range\n"); err = -EINVAL; goto exit_miscdev;