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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 6 Dec 2017 20:36:31 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Arnd Bergmann <arnd@...db.de>, Jimmy Vance <jimmy.vance@....com>,
        Wim Van Sebroeck <wim@...ana.be>
Cc:     Jerry Hoemann <jerry.hoemann@....com>,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: hpwdt: fix unused variable warning

On 12/06/2017 01:02 PM, Arnd Bergmann wrote:
> The new hpwdt_my_nmi() function is used conditionally, which produces
> a harmless warning in some configurations:
> 
> drivers/watchdog/hpwdt.c:478:12: error: 'hpwdt_my_nmi' defined but not used [-Werror=unused-function]
> 
> This moves it inside of the #ifdef that protects its caller, to silence
> the warning.
> 
> Fixes: 621174a92851 ("watchdog: hpwdt: Check source of NMI")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

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

> ---
>   drivers/watchdog/hpwdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index e61658310381..f1f00dfc0e68 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -475,12 +475,12 @@ static int hpwdt_time_left(void)
>   	return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
>   }
>   
> +#ifdef CONFIG_HPWDT_NMI_DECODING
>   static int hpwdt_my_nmi(void)
>   {
>   	return ioread8(hpwdt_nmistat) & 0x6;
>   }
>   
> -#ifdef CONFIG_HPWDT_NMI_DECODING
>   /*
>    *	NMI Handler
>    */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ