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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190930131732.GB29750@roeck-us.net>
Date:   Mon, 30 Sep 2019 06:17:32 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Anson Huang <Anson.Huang@....com>
Cc:     wim@...ux-watchdog.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
        linux-watchdog@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Linux-imx@....com
Subject: Re: [PATCH 2/3] watchdog: imx2_wdt: Use __maybe_unused instead of
 #if CONFIG_PM_SLEEP

On Tue, Sep 24, 2019 at 03:07:07PM +0800, Anson Huang wrote:
> Use __maybe_unused for power management related functions instead
> of #if CONFIG_PM_SLEEP to simply the code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>

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

> ---
>  drivers/watchdog/imx2_wdt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 6711b4e..034f32c 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -358,9 +358,8 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
>  	}
>  }
>  
> -#ifdef CONFIG_PM_SLEEP
>  /* Disable watchdog if it is active or non-active but still running */
> -static int imx2_wdt_suspend(struct device *dev)
> +static int __maybe_unused imx2_wdt_suspend(struct device *dev)
>  {
>  	struct watchdog_device *wdog = dev_get_drvdata(dev);
>  	struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
> @@ -381,7 +380,7 @@ static int imx2_wdt_suspend(struct device *dev)
>  }
>  
>  /* Enable watchdog and configure it if necessary */
> -static int imx2_wdt_resume(struct device *dev)
> +static int __maybe_unused imx2_wdt_resume(struct device *dev)
>  {
>  	struct watchdog_device *wdog = dev_get_drvdata(dev);
>  	struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
> @@ -406,7 +405,6 @@ static int imx2_wdt_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#endif
>  
>  static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
>  			 imx2_wdt_resume);
> -- 
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ