diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-08-25 13:00:16 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-08-28 18:21:41 -0400 |
commit | 843791bb6c76b1f808951b284be5c10ee47fd245 (patch) | |
tree | 664c8002490f81a79dc820659281d3f3fa73c165 | |
parent | 9a6e91d08e7707baa2f824257342ca7efcb199bc (diff) |
cpufreq: speedstep-lib: make several arrays static, makes code smaller
Don't populate arrays on the stack, instead make them static.
Makes the object code smaller by over 860 bytes:
Before:
text data bss dec hex filename
10716 5196 0 15912 3e28 drivers/cpufreq/speedstep-lib.o
After:
text data bss dec hex filename
9690 5356 0 15046 3ac6 drivers/cpufreq/speedstep-lib.o
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/speedstep-lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c index 1b8062182c81..ccab452a4ef5 100644 --- a/drivers/cpufreq/speedstep-lib.c +++ b/drivers/cpufreq/speedstep-lib.c | |||
@@ -35,7 +35,7 @@ static int relaxed_check; | |||
35 | static unsigned int pentium3_get_frequency(enum speedstep_processor processor) | 35 | static unsigned int pentium3_get_frequency(enum speedstep_processor processor) |
36 | { | 36 | { |
37 | /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */ | 37 | /* See table 14 of p3_ds.pdf and table 22 of 29834003.pdf */ |
38 | struct { | 38 | static const struct { |
39 | unsigned int ratio; /* Frequency Multiplier (x10) */ | 39 | unsigned int ratio; /* Frequency Multiplier (x10) */ |
40 | u8 bitmap; /* power on configuration bits | 40 | u8 bitmap; /* power on configuration bits |
41 | [27, 25:22] (in MSR 0x2a) */ | 41 | [27, 25:22] (in MSR 0x2a) */ |
@@ -58,7 +58,7 @@ static unsigned int pentium3_get_frequency(enum speedstep_processor processor) | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */ | 60 | /* PIII(-M) FSB settings: see table b1-b of 24547206.pdf */ |
61 | struct { | 61 | static const struct { |
62 | unsigned int value; /* Front Side Bus speed in MHz */ | 62 | unsigned int value; /* Front Side Bus speed in MHz */ |
63 | u8 bitmap; /* power on configuration bits [18: 19] | 63 | u8 bitmap; /* power on configuration bits [18: 19] |
64 | (in MSR 0x2a) */ | 64 | (in MSR 0x2a) */ |