aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2016-09-11 09:06:01 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-09-12 20:40:24 -0400
commit42ce8921cca08ae8d9068968e6658cae856a99df (patch)
treeddf06964ed5c5b7647b4b31ee3ef6db60b0991ab /drivers/cpufreq
parent297a66221d2bed61e7d74d11bf071c7b489fc33d (diff)
intel_pstate: constify local structures
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <joe@perches.com>. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index be9eade147f2..5095b890a06a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1029,7 +1029,7 @@ static struct cpu_defaults core_params = {
1029 }, 1029 },
1030}; 1030};
1031 1031
1032static struct cpu_defaults silvermont_params = { 1032static const struct cpu_defaults silvermont_params = {
1033 .pid_policy = { 1033 .pid_policy = {
1034 .sample_rate_ms = 10, 1034 .sample_rate_ms = 10,
1035 .deadband = 0, 1035 .deadband = 0,
@@ -1050,7 +1050,7 @@ static struct cpu_defaults silvermont_params = {
1050 }, 1050 },
1051}; 1051};
1052 1052
1053static struct cpu_defaults airmont_params = { 1053static const struct cpu_defaults airmont_params = {
1054 .pid_policy = { 1054 .pid_policy = {
1055 .sample_rate_ms = 10, 1055 .sample_rate_ms = 10,
1056 .deadband = 0, 1056 .deadband = 0,
@@ -1071,7 +1071,7 @@ static struct cpu_defaults airmont_params = {
1071 }, 1071 },
1072}; 1072};
1073 1073
1074static struct cpu_defaults knl_params = { 1074static const struct cpu_defaults knl_params = {
1075 .pid_policy = { 1075 .pid_policy = {
1076 .sample_rate_ms = 10, 1076 .sample_rate_ms = 10,
1077 .deadband = 0, 1077 .deadband = 0,
@@ -1091,7 +1091,7 @@ static struct cpu_defaults knl_params = {
1091 }, 1091 },
1092}; 1092};
1093 1093
1094static struct cpu_defaults bxt_params = { 1094static const struct cpu_defaults bxt_params = {
1095 .pid_policy = { 1095 .pid_policy = {
1096 .sample_rate_ms = 10, 1096 .sample_rate_ms = 10,
1097 .deadband = 0, 1097 .deadband = 0,