From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: rui.zhang@intel.com, edubezval@gmail.com,
andriy.shevchenko@linux.intel.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] thermal: int340x_thermal: Constify attribute_group structures.
Date: Mon, 17 Jul 2017 16:04:39 +0530 [thread overview]
Message-ID: <fce5e6469325c6034ad71102f2a57aa0369ced41.1500287619.git.arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com>
In-Reply-To: <3b42983a016cbb0d1fb3b6bab625b78abf843474.1500287619.git.arvind.yadav.cs@gmail.com>
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work
with const attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
3152 1096 8 4256 10a0 processor_thermal_device.o
File size After adding 'const':
text data bss dec hex filename
3216 1032 8 4256 10a0 processor_thermal_device.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/thermal/int340x_thermal/processor_thermal_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/int340x_thermal/processor_thermal_device.c b/drivers/thermal/int340x_thermal/processor_thermal_device.c
index ff3b36f..f02341f 100644
--- a/drivers/thermal/int340x_thermal/processor_thermal_device.c
+++ b/drivers/thermal/int340x_thermal/processor_thermal_device.c
@@ -127,7 +127,7 @@ enum proc_thermal_emum_mode_type {
NULL
};
-static struct attribute_group power_limit_attribute_group = {
+static const struct attribute_group power_limit_attribute_group = {
.attrs = power_limit_attrs,
.name = "power_limits"
};
--
1.9.1
next prev parent reply other threads:[~2017-07-17 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 10:34 [PATCH 1/2] thermal: int340x: constify " Arvind Yadav
2017-07-17 10:34 ` Arvind Yadav [this message]
2017-07-17 10:41 ` Andy Shevchenko
2017-07-17 10:59 ` Arvind Yadav
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=fce5e6469325c6034ad71102f2a57aa0369ced41.1500287619.git.arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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®