Linux Serial subsystem development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-serial <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Paul Cercueil <paul@crapouillou.net>
Subject: Re: [PATCH v1 1/1] serial: 8250_dw: Drop PM ifdeffery
Date: Thu, 30 Jun 2022 10:41:40 +0300 (EEST)	[thread overview]
Message-ID: <4ae74f48-c51c-cb74-548d-46ff9a9a7a7b@linux.intel.com> (raw)
In-Reply-To: <20220628214511.37373-1-andriy.shevchenko@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2034 bytes --]

On Wed, 29 Jun 2022, Andy Shevchenko wrote:

> Drop CONFIG_PM and CONFIG_PM_SLEEP ifdeffery while converting dw8250_pm_ops
> to use new PM macros.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Not directily related to the patch itself but do you have any idea why 
1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones") 
didn't wrap RUNTIME_PM_OPS() pointers with pm_ptr()? I'm asking this 
because in SET_RUNTIME_PM_OPS() the callbacks are only created with
#ifdef CONFIG_PM so I'd have expected RUNTIME_PM_OPS() to maintain that 
behavior but it didn't? Was it just an oversight that should be fixed?

-- 
 i.

> ---
>  drivers/tty/serial/8250/8250_dw.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index f71428c85562..adcc869352b1 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -691,7 +691,6 @@ static int dw8250_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM_SLEEP
>  static int dw8250_suspend(struct device *dev)
>  {
>  	struct dw8250_data *data = dev_get_drvdata(dev);
> @@ -709,9 +708,7 @@ static int dw8250_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#endif /* CONFIG_PM_SLEEP */
>  
> -#ifdef CONFIG_PM
>  static int dw8250_runtime_suspend(struct device *dev)
>  {
>  	struct dw8250_data *data = dev_get_drvdata(dev);
> @@ -733,11 +730,10 @@ static int dw8250_runtime_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#endif
>  
>  static const struct dev_pm_ops dw8250_pm_ops = {
> -	SET_SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
> -	SET_RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
> +	SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
> +	RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
>  };
>  
>  static const struct dw8250_platform_data dw8250_dw_apb = {
> 

  reply	other threads:[~2022-06-30  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 21:45 [PATCH v1 1/1] serial: 8250_dw: Drop PM ifdeffery Andy Shevchenko
2022-06-30  7:41 ` Ilpo Järvinen [this message]
2022-06-30  7:56   ` Andy Shevchenko
2022-06-30  8:44   ` Paul Cercueil
2022-06-30  9:00     ` Ilpo Järvinen
2022-06-30  9:31     ` Andy Shevchenko

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=4ae74f48-c51c-cb74-548d-46ff9a9a7a7b@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=paul@crapouillou.net \
    /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