Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-serial <linux-serial@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Jiri Slaby" <jirislaby@kernel.org>
Subject: Re: [PATCH v1 1/1] serial: 8250_dw: Drop PM ifdeffery
Date: Thu, 30 Jun 2022 12:31:12 +0300	[thread overview]
Message-ID: <Yr1tYLgj4+F8pKO4@smile.fi.intel.com> (raw)
In-Reply-To: <J98AER.7ZO6O9DK05IM1@crapouillou.net>

On Thu, Jun 30, 2022 at 09:44:07AM +0100, Paul Cercueil wrote:
> Le jeu., juin 30 2022 at 10:41:40 +0300, Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> a écrit :
> > 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>

I will drop this for v2.

> > 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?
> 
> The RUNTIME_PM_OPS() does not wrap pointers with pm_ptr(), because the
> pointer to the dev_pm_ops should only ever be used wrapped with pm_ptr() or
> pm_sleep_ptr().
> 
> Which is not done here.
> 
> Andy:
> The deference of dw8250_pm_ops should be pm_ptr(&dw8250_pm_ops). If you only
> had system suspend/resume functions, you'd use pm_sleep_ptr() there.

Right, it's a shame how I forgot that while telling everybody to use them.

Thanks, Paul!

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2022-06-30  9:31 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
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 [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=Yr1tYLgj4+F8pKO4@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --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