From: Robert Lee <rob.lee@linaro.org>
To: rjw@sisk.pl
Cc: len.brown@intel.com, hpa@linux.intel.com,
daniel.lezcano@linaro.org, amit.kucheria@linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@linaro.org
Subject: [PATCH] pm: remove useless array definition in cpuidle_structure
Date: Thu, 3 Nov 2011 17:44:53 -0400 [thread overview]
Message-ID: <1320356693-18982-1-git-send-email-rob.lee@linaro.org> (raw)
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
--
1.7.4.1
next reply other threads:[~2011-11-03 21:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 21:44 Robert Lee [this message]
2011-11-04 12:21 ` Deepthi Dharwar
2011-11-04 22:28 ` Rafael J. Wysocki
2011-11-07 18:59 ` Daniel Lezcano
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=1320356693-18982-1-git-send-email-rob.lee@linaro.org \
--to=rob.lee@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=daniel.lezcano@linaro.org \
--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 \
/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
all inboxes | Powered by JetHome®