Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672528 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-06-22 13:00 +0200 |
| Last post | 2017-06-22 13:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] PM / QoS: constify *_attribute_group. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-06-22 13:00 +0200
Re: [PATCH] PM / QoS: constify *_attribute_group. Pavel Machek <pavel@ucw.cz> - 2017-06-22 13:30 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-06-22 13:00 +0200 |
| Subject | [PATCH] PM / QoS: constify *_attribute_group. |
| Message-ID | <tV80a-3zb-7@gated-at.bofh.it> |
File size before:
text data bss dec hex filename
3890 1152 8 5050 13ba drivers/base/power/sysfs.o
File size After adding 'const':
text data bss dec hex filename
4250 800 8 5058 13c2 drivers/base/power/sysfs.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/base/power/sysfs.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
index 33b4b90..185a525 100644
--- a/drivers/base/power/sysfs.c
+++ b/drivers/base/power/sysfs.c
@@ -607,7 +607,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
#endif /* CONFIG_PM_ADVANCED_DEBUG */
NULL,
};
-static struct attribute_group pm_attr_group = {
+static const struct attribute_group pm_attr_group = {
.name = power_group_name,
.attrs = power_attrs,
};
@@ -629,7 +629,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
#endif
NULL,
};
-static struct attribute_group pm_wakeup_attr_group = {
+static const struct attribute_group pm_wakeup_attr_group = {
.name = power_group_name,
.attrs = wakeup_attrs,
};
@@ -644,7 +644,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
&dev_attr_autosuspend_delay_ms.attr,
NULL,
};
-static struct attribute_group pm_runtime_attr_group = {
+static const struct attribute_group pm_runtime_attr_group = {
.name = power_group_name,
.attrs = runtime_attrs,
};
@@ -653,7 +653,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
&dev_attr_pm_qos_resume_latency_us.attr,
NULL,
};
-static struct attribute_group pm_qos_resume_latency_attr_group = {
+static const struct attribute_group pm_qos_resume_latency_attr_group = {
.name = power_group_name,
.attrs = pm_qos_resume_latency_attrs,
};
@@ -662,7 +662,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
&dev_attr_pm_qos_latency_tolerance_us.attr,
NULL,
};
-static struct attribute_group pm_qos_latency_tolerance_attr_group = {
+static const struct attribute_group pm_qos_latency_tolerance_attr_group = {
.name = power_group_name,
.attrs = pm_qos_latency_tolerance_attrs,
};
@@ -672,7 +672,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr,
&dev_attr_pm_qos_remote_wakeup.attr,
NULL,
};
-static struct attribute_group pm_qos_flags_attr_group = {
+static const struct attribute_group pm_qos_flags_attr_group = {
.name = power_group_name,
.attrs = pm_qos_flags_attrs,
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-06-22 13:30 +0200 |
| Message-ID | <tV8tb-3Zd-5@gated-at.bofh.it> |
| In reply to | #1672528 |
[Multipart message — attachments visible in raw view] — view raw
On Thu 2017-06-22 16:23:32, Arvind Yadav wrote: > File size before: > text data bss dec hex filename > 3890 1152 8 5050 13ba drivers/base/power/sysfs.o > > File size After adding 'const': > text data bss dec hex filename > 4250 800 8 5058 13c2 drivers/base/power/sysfs.o > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web