lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210828160703.GA821909@roeck-us.net>
Date:   Sat, 28 Aug 2021 09:07:03 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Ahmad Fatoum <a.fatoum@...gutronix.de>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...gutronix.de
Subject: Re: [PATCH v5 2/7] watchdog: f71808e_wdt: remove superfluous global

On Mon, Aug 09, 2021 at 06:20:32PM +0200, Ahmad Fatoum wrote:
> max_timeout never served any purpose over WATCHDOG_MAX_TIMEOUT, which it
> was initialized with. Drop it.
> 
> Suggested-by: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ