linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Kevin Hilman <khilman@kernel.org>,
	Lina Iyer <lina.iyer@linaro.org>
Subject: Re: [PATCH] PM / Domains: Correct comment in irq_safe_dev_in_no_sleep_domain()
Date: Tue, 31 Jan 2017 17:17:37 +0100	[thread overview]
Message-ID: <CAMuHMdXRvOTKCdvwy5JZM6RhSifse_goHubZq4FaMcOFE7x99g@mail.gmail.com> (raw)
In-Reply-To: <1485878463-1672-1-git-send-email-ulf.hansson@linaro.org>

Hi Ulf,

On Tue, Jan 31, 2017 at 5:01 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> The earlier comment stated that the dev_warn_once() was going to be printed
> once per device. Let's fix that, as dev_warn_once() is printed only once,
> no matter of the device.

While I agree this makes the comment match the code, I think we would serve
the users better by printing the warning once per PM domain.
Currently the user cannot know if two or more PM domains cannot be powered
off due to IRQ safe devices.

Perhaps a flag can be added to generic_pm_domain.flags to remember
that the warning has been printed before?

> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/base/power/domain.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 6b23d82..271e208 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -130,7 +130,7 @@ static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev,
>
>         ret = pm_runtime_is_irq_safe(dev) && !genpd_is_irq_safe(genpd);
>
> -       /* Warn once for each IRQ safe dev in no sleep domain */
> +       /* Warn once if IRQ safe dev in no sleep domain */
>         if (ret)
>                 dev_warn_once(dev, "PM domain %s will not be powered off\n",
>                                 genpd->name);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2017-01-31 16:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 16:01 [PATCH] PM / Domains: Correct comment in irq_safe_dev_in_no_sleep_domain() Ulf Hansson
2017-01-31 16:17 ` Geert Uytterhoeven [this message]
2017-01-31 16:41   ` Ulf Hansson
2017-01-31 17:17     ` Geert Uytterhoeven
2017-02-02  9:55       ` Ulf Hansson
2017-01-31 16:17 ` Lina Iyer

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=CAMuHMdXRvOTKCdvwy5JZM6RhSifse_goHubZq4FaMcOFE7x99g@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=khilman@kernel.org \
    --cc=len.brown@intel.com \
    --cc=lina.iyer@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).