Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268734 > unrolled thread
| Started by | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| First post | 2015-11-13 10:50 +0100 |
| Last post | 2015-11-13 10:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] x86, mtrr: mark range_new in mtrr_calc_range_state() as __initdata Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-11-13 10:50 +0100
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Date | 2015-11-13 10:50 +0100 |
| Subject | [PATCH] x86, mtrr: mark range_new in mtrr_calc_range_state() as __initdata |
| Message-ID | <quj9w-4FD-3@gated-at.bofh.it> |
range_new doesn't seem to be used after init. It is only passed to
memset, sum_ranges, memcmp and x86_get_mtrr_mem_range, the latter of
which also only passes it on to various *range* library functions. So
mark it __initdata to free up an extra page after init.
nr_range_new is unconditionally assigned to before it is read, so
there's no point in having it static.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
arch/x86/kernel/cpu/mtrr/cleanup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c
index 70d7c93f4550..b1a9ad366f67 100644
--- a/arch/x86/kernel/cpu/mtrr/cleanup.c
+++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
@@ -593,9 +593,9 @@ mtrr_calc_range_state(u64 chunk_size, u64 gran_size,
unsigned long x_remove_base,
unsigned long x_remove_size, int i)
{
- static struct range range_new[RANGE_NUM];
+ static struct range range_new[RANGE_NUM] __initdata;
unsigned long range_sums_new;
- static int nr_range_new;
+ int nr_range_new;
int num_reg;
/* Convert ranges to var ranges state: */
--
2.6.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web