Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Paul Cercueil <paul@crapouillou.net>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] iio: adc: rzg2l: Use RUNTIME_PM_OPS() instead of SET_*
Date: Sat, 13 Aug 2022 17:13:03 +0100	[thread overview]
Message-ID: <20220813171303.7b682989@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfFGUQevM3skOF_wSxSvTTUy98KCDqyOXUhBLpZ6-g4UQ@mail.gmail.com>

On Mon, 8 Aug 2022 11:34:23 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sun, Aug 7, 2022 at 9:11 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Here we could use DEFINE_RUNTIME_DEV_PM_OPS() but that would have the
> > side effect of providing suspend and resume support.  That would be
> > harmless but also of little purpose as this driver does very simplistic
> > power management with synchronous power up and down around individual
> > channel reads.
> >
> > In general these new PM macros avoid the need to mark functions
> > __maybe_unused, whilst still allowing the compiler to remove them
> > if they are unused.  
> 
> ...
> 
> >  static const struct dev_pm_ops rzg2l_adc_pm_ops = {
> > -       SET_RUNTIME_PM_OPS(rzg2l_adc_pm_runtime_suspend,
> > -                          rzg2l_adc_pm_runtime_resume,
> > -                          NULL)
> > +       RUNTIME_PM_OPS(rzg2l_adc_pm_runtime_suspend,
> > +                      rzg2l_adc_pm_runtime_resume,
> > +                      NULL)
> >  };  
> 
> DEFINE_RUNTIME_DEV_PM_OPS() ?
> 
Disagreeing with the patch description argument on why I didn't do that?
The extra ops set will never have anything to do...  Mostly harmless,
but kind of gives the wrong impression of what is going on in this
driver.

Jonathan


  reply	other threads:[~2022-08-13 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 19:07 [PATCH] iio: adc: rzg2l: Use RUNTIME_PM_OPS() instead of SET_* Jonathan Cameron
2022-08-08  9:34 ` Andy Shevchenko
2022-08-13 16:13   ` Jonathan Cameron [this message]
2022-08-14 19:12     ` Andy Shevchenko
2022-08-20 11:40       ` Jonathan Cameron
2023-01-28 18:06 ` Jonathan Cameron

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=20220813171303.7b682989@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-iio@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