From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: len.brown@intel.com, Arjan van de Ven <arjan@linux.intel.com>,
Deepthi Dharwar <deepthi@linux.vnet.ibm.com>,
Robert Lee <rob.lee@linaro.org>,
hpa@linux.intel.com, amit.kucheria@linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@linaro.org
Subject: Re: [PATCH] pm: remove useless array definition in cpuidle_structure
Date: Mon, 07 Nov 2011 19:59:03 +0100 [thread overview]
Message-ID: <4EB82A77.3080804@linaro.org> (raw)
In-Reply-To: <201111042328.43358.rjw@sisk.pl>
On 11/04/2011 11:28 PM, Rafael J. Wysocki wrote:
> Len, Arjan,
>
> On Friday, November 04, 2011, Deepthi Dharwar wrote:
>> On Friday 04 November 2011 03:14 AM, Robert Lee wrote:
>>> From: Daniel Lezcano<daniel.lezcano@linaro.org>
>>>
>>> All the modules name are ro-data, it is never copied to the array.
>>>
>>> eg.
>>>
>>> static struct cpuidle_driver intel_idle_driver = {
>>> .name = "intel_idle",
>>> .owner = THIS_MODULE,
>>> };
>>>
>>> It safe to assign the pointer of this ro-data to a const char *.
>>> By this way we save 12 bytes.
>>>
>>> Signed-off-by: Daniel Lezcano<daniel.lezcano@linaro.org>
>>> Signed-off-by: Robert Lee<rob.lee@linaro.org>
>>> ---
>>> include/linux/cpuidle.h | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
>>> index b51629e..16f9dce 100644
>>> --- a/include/linux/cpuidle.h
>>> +++ b/include/linux/cpuidle.h
>>> @@ -117,8 +117,8 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
>>> ****************************/
>>>
>>> struct cpuidle_driver {
>>> - char name[CPUIDLE_NAME_LEN];
>>> - struct module *owner;
>>> + const char *name;
>>> + struct module *owner;
>>> };
>>>
>>> #ifdef CONFIG_CPU_IDLE
>>
>> This looks good, and makes it fool-proof by not allowing one to tamper the name of the driver.
>> Tested OK on x86 (both Intel idle and ACPI)
>>
>> Tested-by: Deepthi Dharwar<deepthi@linux.vnet.ibm.com>
>> Reviewed-by: Deepthi Dharwar<deepthi@linux.vnet.ibm.com>
>
> This is simple enough for me to push it for 3.2, but I woulnd't like to
> step on anyone's toes. Please let me know what you think.
>
> Rafael
Hi Len,
are you willing to take this patch for 3.2 ?
Thanks
-- Daniel
--
<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
prev parent reply other threads:[~2011-11-07 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 21:44 [PATCH] pm: remove useless array definition in cpuidle_structure Robert Lee
2011-11-04 12:21 ` Deepthi Dharwar
2011-11-04 22:28 ` Rafael J. Wysocki
2011-11-07 18:59 ` Daniel Lezcano [this message]
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=4EB82A77.3080804@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=arjan@linux.intel.com \
--cc=deepthi@linux.vnet.ibm.com \
--cc=hpa@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rjw@sisk.pl \
--cc=rob.lee@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.