All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] PM / Domains: Extract code to power off/on a PM domain
Date: Wed, 29 Oct 2014 10:09:56 -0700	[thread overview]
Message-ID: <7htx2majkr.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAMuHMdWA+KeEoS+79Qos958r=4rWGN_ZeAbhP9FB5ZoEoQKqpQ@mail.gmail.com> (Geert Uytterhoeven's message of "Wed, 29 Oct 2014 14:32:30 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Ulf,
>
> On Wed, Oct 29, 2014 at 2:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 23 October 2014 14:12, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>>> PM domains are powered on/off from various places. Some callers do
>>> latency measurements, others don't. Consolidate using two helper
>>> functions, which always measure the latencies, and update the stored
>>> latencies when needed.
>>>
>>> Other minor changes:
>>>   - Use pr_warn() instead of pr_warning(),
>>>   - There's no need to check genpd->name, %s handles NULL pointers fine,
>>>   - Make the warning format strings identical, to save memory.
>>>
>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Thanks for your review.
>
>>> --- a/drivers/base/power/domain.c
>>> +++ b/drivers/base/power/domain.c
>>> @@ -151,6 +151,59 @@ static void genpd_recalc_cpu_exit_latency(struct generic_pm_domain *genpd)
>>>         genpd->cpuidle_data->idle_state->exit_latency = usecs64;
>>>  }
>>>
>>> +static int do_genpd_power_on(struct generic_pm_domain *genpd)
>>
>> Should we try to agree on the prefixes of the function names in genpd?
>> Currently there are a mix of them.
>>
>> May I suggest we try to stick to this:
>>
>> Exported functions:
>> pm_genpd_*
>> _pm_genpd_*
>> __pm_genpd_*
>>
>> Static functions:
>> genpd_*
>> _genpd_*
>> __genpd_*
>>
>> What do you think? Do you have any better suggestions?
>
> Sounds sane.
>
> So:
>
> s/do_genpd_power_on/genpd_power_on/
> s/do_genpd_power_off/genpd_power_off/

With that name change, feel free to add

Reviewed-by: Kevin Hilman <khilman@linaro.org>

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
	"linux-pm\@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] PM / Domains: Extract code to power off/on a PM domain
Date: Wed, 29 Oct 2014 10:09:56 -0700	[thread overview]
Message-ID: <7htx2majkr.fsf@deeprootsystems.com> (raw)
In-Reply-To: <CAMuHMdWA+KeEoS+79Qos958r=4rWGN_ZeAbhP9FB5ZoEoQKqpQ@mail.gmail.com> (Geert Uytterhoeven's message of "Wed, 29 Oct 2014 14:32:30 +0100")

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> Hi Ulf,
>
> On Wed, Oct 29, 2014 at 2:25 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 23 October 2014 14:12, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>>> PM domains are powered on/off from various places. Some callers do
>>> latency measurements, others don't. Consolidate using two helper
>>> functions, which always measure the latencies, and update the stored
>>> latencies when needed.
>>>
>>> Other minor changes:
>>>   - Use pr_warn() instead of pr_warning(),
>>>   - There's no need to check genpd->name, %s handles NULL pointers fine,
>>>   - Make the warning format strings identical, to save memory.
>>>
>>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>>
>> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Thanks for your review.
>
>>> --- a/drivers/base/power/domain.c
>>> +++ b/drivers/base/power/domain.c
>>> @@ -151,6 +151,59 @@ static void genpd_recalc_cpu_exit_latency(struct generic_pm_domain *genpd)
>>>         genpd->cpuidle_data->idle_state->exit_latency = usecs64;
>>>  }
>>>
>>> +static int do_genpd_power_on(struct generic_pm_domain *genpd)
>>
>> Should we try to agree on the prefixes of the function names in genpd?
>> Currently there are a mix of them.
>>
>> May I suggest we try to stick to this:
>>
>> Exported functions:
>> pm_genpd_*
>> _pm_genpd_*
>> __pm_genpd_*
>>
>> Static functions:
>> genpd_*
>> _genpd_*
>> __genpd_*
>>
>> What do you think? Do you have any better suggestions?
>
> Sounds sane.
>
> So:
>
> s/do_genpd_power_on/genpd_power_on/
> s/do_genpd_power_off/genpd_power_off/

With that name change, feel free to add

Reviewed-by: Kevin Hilman <khilman@linaro.org>

Kevin

  parent reply	other threads:[~2014-10-29 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 12:12 [PATCH 1/2] PM / Domains: Make genpd parameter of pm_genpd_present() const Geert Uytterhoeven
2014-10-23 12:12 ` [PATCH 2/2] PM / Domains: Extract code to power off/on a PM domain Geert Uytterhoeven
2014-10-29 13:25   ` Ulf Hansson
2014-10-29 13:32     ` Geert Uytterhoeven
2014-10-29 13:37       ` Ulf Hansson
2014-10-29 17:09       ` Kevin Hilman [this message]
2014-10-29 17:09         ` Kevin Hilman
2014-10-29 17:06 ` [PATCH 1/2] PM / Domains: Make genpd parameter of pm_genpd_present() const Kevin Hilman

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=7htx2majkr.fsf@deeprootsystems.com \
    --to=khilman@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.