All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	lina.iyer@linaro.org, Lorenzo.Pieralisi@arm.com
Subject: Re: [PATCH 6/8] ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64
Date: Wed, 25 Mar 2015 23:02:00 +0100	[thread overview]
Message-ID: <55133058.6020603@linaro.org> (raw)
In-Reply-To: <1427316850.10958.58.camel@x220>

On 03/25/2015 09:54 PM, Paul Bolle wrote:
> A few nits are all I spotted.
>
> On Wed, 2015-03-25 at 10:07 +0100, Daniel Lezcano wrote:
>> --- a/drivers/cpuidle/Kconfig.arm
>> +++ b/drivers/cpuidle/Kconfig.arm
>
>> +config ARM_CPUIDLE
>> +        bool "Generic ARM/ARM64 CPU idle Driver"
>> +        select DT_IDLE_STATES
>> +        help
>> +          Select this to enable generic cpuidle driver for ARM.
>> +          It provides a generic idle driver whose idle states are configured
>> +          at run-time through DT nodes. The CPUidle suspend backend is
>> +          initialized by calling the CPU operations init idle hook
>> +          provided by architecture code.
>
> Start with a tab instead of 8 spaces, please.

Ok, I will send a fix for that on top of this patch.

>> --- /dev/null
>> +++ b/drivers/cpuidle/cpuidle-arm.c
>
>> +#include <linux/cpuidle.h>
>> +#include <linux/cpumask.h>
>> +#include <linux/cpu_pm.h>
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>
> Is this include actually needed? I haven't tried building this without
> that include, but I spotted nothing obviously module related in this
> file.
>
>> +#include <linux/of.h>
>> +
>> +#include <asm/cpuidle.h>
>> +
>> +#include "dt_idle_states.h"
>
>> +static struct cpuidle_driver arm_idle_driver = {
>> +	.name = "arm_idle",
>> +	.owner = THIS_MODULE,
>
> Since this can only be built in, THIS_MODULE will (basically) be
> equivalent to NULL according to include/linux/export.h. So I suppose
> this line can be dropped.

Yeah, THIS_MODULE is present in all drivers. Very likely we can safely 
remove it.

>> +	/*
>> +	 * State at index 0 is standby wfi and considered standard
>> +	 * on all ARM platforms. If in some platforms simple wfi
>> +	 * can't be used as "state 0", DT bindings must be implemented
>> +	 * to work around this issue and allow installing a special
>> +	 * handler for idle state index 0.
>> +	 */
>> +	.states[0] = {
>> +		.enter                  = arm_enter_idle_state,
>> +		.exit_latency           = 1,
>> +		.target_residency       = 1,
>> +		.power_usage		= UINT_MAX,
>> +		.name                   = "WFI",
>> +		.desc                   = "ARM WFI",
>> +	}
>> +};
>
> I did notice that these two nits are already present in
> drivers/cpuidle/cpuidle-arm64.c. But since this patch is not just moving
> that file's content around, you might as well look into those two nits.

We can address the module code removal in a separate patchset as this is 
the case for all the drivers.


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


WARNING: multiple messages have this Message-ID (diff)
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64
Date: Wed, 25 Mar 2015 23:02:00 +0100	[thread overview]
Message-ID: <55133058.6020603@linaro.org> (raw)
In-Reply-To: <1427316850.10958.58.camel@x220>

On 03/25/2015 09:54 PM, Paul Bolle wrote:
> A few nits are all I spotted.
>
> On Wed, 2015-03-25 at 10:07 +0100, Daniel Lezcano wrote:
>> --- a/drivers/cpuidle/Kconfig.arm
>> +++ b/drivers/cpuidle/Kconfig.arm
>
>> +config ARM_CPUIDLE
>> +        bool "Generic ARM/ARM64 CPU idle Driver"
>> +        select DT_IDLE_STATES
>> +        help
>> +          Select this to enable generic cpuidle driver for ARM.
>> +          It provides a generic idle driver whose idle states are configured
>> +          at run-time through DT nodes. The CPUidle suspend backend is
>> +          initialized by calling the CPU operations init idle hook
>> +          provided by architecture code.
>
> Start with a tab instead of 8 spaces, please.

Ok, I will send a fix for that on top of this patch.

>> --- /dev/null
>> +++ b/drivers/cpuidle/cpuidle-arm.c
>
>> +#include <linux/cpuidle.h>
>> +#include <linux/cpumask.h>
>> +#include <linux/cpu_pm.h>
>> +#include <linux/kernel.h>
>> +#include <linux/module.h>
>
> Is this include actually needed? I haven't tried building this without
> that include, but I spotted nothing obviously module related in this
> file.
>
>> +#include <linux/of.h>
>> +
>> +#include <asm/cpuidle.h>
>> +
>> +#include "dt_idle_states.h"
>
>> +static struct cpuidle_driver arm_idle_driver = {
>> +	.name = "arm_idle",
>> +	.owner = THIS_MODULE,
>
> Since this can only be built in, THIS_MODULE will (basically) be
> equivalent to NULL according to include/linux/export.h. So I suppose
> this line can be dropped.

Yeah, THIS_MODULE is present in all drivers. Very likely we can safely 
remove it.

>> +	/*
>> +	 * State at index 0 is standby wfi and considered standard
>> +	 * on all ARM platforms. If in some platforms simple wfi
>> +	 * can't be used as "state 0", DT bindings must be implemented
>> +	 * to work around this issue and allow installing a special
>> +	 * handler for idle state index 0.
>> +	 */
>> +	.states[0] = {
>> +		.enter                  = arm_enter_idle_state,
>> +		.exit_latency           = 1,
>> +		.target_residency       = 1,
>> +		.power_usage		= UINT_MAX,
>> +		.name                   = "WFI",
>> +		.desc                   = "ARM WFI",
>> +	}
>> +};
>
> I did notice that these two nits are already present in
> drivers/cpuidle/cpuidle-arm64.c. But since this patch is not just moving
> that file's content around, you might as well look into those two nits.

We can address the module code removal in a separate patchset as this is 
the case for all the drivers.


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2015-03-25 22:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  9:05 [GIT PULL] : ARM cpuidle changes for 4.1 Daniel Lezcano
2015-03-25  9:05 ` Daniel Lezcano
2015-03-25  9:07 ` [PATCH 1/8] ARM: cpuidle: Remove duplicate header inclusion Daniel Lezcano
2015-03-25  9:07   ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 2/8] ARM: cpuidle: Add a cpuidle ops structure to be used for DT Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 3/8] ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 4/8] ARM64: cpuidle: Rename cpu_init_idle to a common function name Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 5/8] ARM64: cpuidle: Remove arm64 reference Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 6/8] ARM: cpuidle: Enable the ARM64 driver for both ARM32/ARM64 Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25 20:54     ` Paul Bolle
2015-03-25 20:54       ` Paul Bolle
2015-03-25 22:02       ` Daniel Lezcano [this message]
2015-03-25 22:02         ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 7/8] ARM: cpuidle: Register per cpuidle device Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25  9:07   ` [PATCH 8/8] ARM: cpuidle: Document the code Daniel Lezcano
2015-03-25  9:07     ` Daniel Lezcano
2015-03-25 11:47 ` [GIT PULL] : ARM cpuidle changes for 4.1 Rafael J. Wysocki
2015-03-25 11:47   ` Rafael J. Wysocki

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=55133058.6020603@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=lina.iyer@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=rjw@rjwysocki.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 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.