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]
Message-ID: <20220908134319.00005f59@huawei.com>
Date:   Thu, 8 Sep 2022 13:43:19 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Crt Mori <cmo@...exis.com>, Jonathan Cameron <jic23@...nel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/3] iio: temperature: mlx90632 Add runtime
 powermanagement modes

On Tue, 6 Sep 2022 16:16:07 +0300
Andy Shevchenko <andy.shevchenko@...il.com> wrote:

> On Tue, Sep 6, 2022 at 4:04 PM Crt Mori <cmo@...exis.com> wrote:
> > On Tue, 6 Sept 2022 at 14:37, Andy Shevchenko <andy.shevchenko@...il.com> wrote:  
> > > On Tue, Sep 6, 2022 at 1:52 PM Crt Mori <cmo@...exis.com> wrote:  
> > > > On Tue, 6 Sept 2022 at 12:21, Andy Shevchenko <andy.shevchenko@...il.com> wrote:  
> > > > >
> > > > > Very good and documented code, thanks!
> > > > > I believe you better to use DEFINE_.*_PM_OPS instead of legacy ones
> > > > > (due to pm_ptr() usage).
> > > > > Otherwise, with some nitpicks that wouldn't prevent a green light,
> > > > > Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> > > > >  
> > > > I checked DEFINE_.*_PM_OPS usage around drivers and you either have
> > > > SIMPLE (where you define suspend/resume) or you have RUNTIME (for
> > > > runtime suspend/resume), but never are those two together. So I am a
> > > > bit puzzled how to get this working.  
> > >
> > > The one which suits here is called _DEFINE_DEV_PM_OPS(). But it's
> > > basically the same what you put here with the possible unused case.
> > >  
> > I thought underscore prefixed macros are the ones not to be used
> > directly by drivers. I also found no occurrence in current drivers, so
> > it was not something that was done so far?  
> 
> Looks like... Okay, then let's leave it to the maintainer to decide.
> 

Indeed. Discussion ended up at right place. Don't use _DEFINE_DEV_PM_OPS()
in a driver. The solution here is correct as is.

As a side note, I think _DEFINE_DEV_PM_OPS() is getting removed or redefined
as part of tidying up the missing EXPORT_* cases. (I'm too lazy to find the
patch set but it was for mfd drivers).

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ