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]
Date:   Tue, 12 Oct 2021 08:31:46 +0200
From:   Alexander Sverdlin <alexander.sverdlin@...il.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-input@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] Input: ep93xx_keypad - annotate suspend/resume as
 __maybe_unused

Hi!

On Mon, 2021-10-11 at 18:37 -0700, Dmitry Torokhov wrote:
> Instead of guarding suspend/resume methods with #ifdef CONFIG_PM
> let's mark them as __maybe_unused as this allows better compile
> coverage.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Acked-by: Alexander Sverdlin <alexander.sverdlin@...il.com>

> ---
>  drivers/input/keyboard/ep93xx_keypad.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
> index e0e931e796fa..a0c6cdf8e0d3 100644
> --- a/drivers/input/keyboard/ep93xx_keypad.c
> +++ b/drivers/input/keyboard/ep93xx_keypad.c
> @@ -175,8 +175,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev)
>  }
>  
>  
> -#ifdef CONFIG_PM_SLEEP
> -static int ep93xx_keypad_suspend(struct device *dev)
> +static int __maybe_unused ep93xx_keypad_suspend(struct device *dev)
>  {
>         struct platform_device *pdev = to_platform_device(dev);
>         struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
> @@ -197,7 +196,7 @@ static int ep93xx_keypad_suspend(struct device *dev)
>         return 0;
>  }
>  
> -static int ep93xx_keypad_resume(struct device *dev)
> +static int __maybe_unused ep93xx_keypad_resume(struct device *dev)
>  {
>         struct platform_device *pdev = to_platform_device(dev);
>         struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
> @@ -220,7 +219,6 @@ static int ep93xx_keypad_resume(struct device *dev)
>  
>         return 0;
>  }
> -#endif
>  
>  static SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
>                          ep93xx_keypad_suspend, ep93xx_keypad_resume);

-- 
Alexander Sverdlin.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ