linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] Input: ep93xx_keypad - annotate suspend/resume as __maybe_unused
Date: Tue, 12 Oct 2021 08:31:46 +0200	[thread overview]
Message-ID: <0659a1c0088e573eb04caa87e6673ebc1ce79702.camel@gmail.com> (raw)
In-Reply-To: <20211012013735.3523140-1-dmitry.torokhov@gmail.com>

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@gmail.com>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.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.



      parent reply	other threads:[~2021-10-12  6:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  1:37 [PATCH 1/4] Input: ep93xx_keypad - annotate suspend/resume as __maybe_unused Dmitry Torokhov
2021-10-12  1:37 ` [PATCH 2/4] Input: ep93xx_keypad - use BIT() and GENMASK() macros Dmitry Torokhov
2021-10-12  6:58   ` Alexander Sverdlin
2021-10-12  1:37 ` [PATCH 3/4] Input: ep93xx_keypad - use dev_pm_set_wake_irq() Dmitry Torokhov
2021-10-12  7:30   ` Alexander Sverdlin
2021-10-12  1:37 ` [PATCH 4/4] Input: ep93xx_keypad - switch to using managed resources Dmitry Torokhov
2021-10-12  7:54   ` Alexander Sverdlin
2021-10-13  2:34     ` Dmitry Torokhov
2021-10-13  2:36   ` [PATCH v2 " Dmitry Torokhov
2021-10-13  5:42     ` Alexander Sverdlin
2021-10-12  6:31 ` Alexander Sverdlin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0659a1c0088e573eb04caa87e6673ebc1ce79702.camel@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).