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] [day] [month] [year] [list]
Date:   Thu, 30 Jun 2022 12:31:12 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jiri Slaby <jirislaby@...nel.org>
Subject: Re: [PATCH v1 1/1] serial: 8250_dw: Drop PM ifdeffery

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@...ux.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@...ux.intel.com>
> > 
> > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ