From: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] -mm: constify some parts of arch/i386/kernel/cpu/
Date: Tue, 23 May 2006 20:07:32 +0200 [thread overview]
Message-ID: <20060523180732.GD24461@rhlx01.fht-esslingen.de> (raw)
Hello all,
patch run-tested on linux-2.6.17-rc4-mm3.
Signed-off-by: Andreas Mohr <andi@lisas.de>
diff -urN linux-2.6.17-rc4-mm3.orig/arch/i386/kernel/cpu/intel_cacheinfo.c linux-2.6.17-rc4-mm3.my/arch/i386/kernel/cpu/intel_cacheinfo.c
--- linux-2.6.17-rc4-mm3.orig/arch/i386/kernel/cpu/intel_cacheinfo.c 2006-05-23 19:14:13.000000000 +0200
+++ linux-2.6.17-rc4-mm3/arch/i386/kernel/cpu/intel_cacheinfo.c 2006-05-23 17:27:28.000000000 +0200
@@ -159,13 +159,13 @@
unsigned val;
};
-static unsigned short assocs[] = {
+static const unsigned short assocs[] = {
[1] = 1, [2] = 2, [4] = 4, [6] = 8,
[8] = 16,
[0xf] = 0xffff // ??
};
-static unsigned char levels[] = { 1, 1, 2 };
-static unsigned char types[] = { 1, 2, 3 };
+static const unsigned char levels[] = { 1, 1, 2 };
+static const unsigned char types[] = { 1, 2, 3 };
static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax,
union _cpuid4_leaf_ebx *ebx,
diff -urN linux-2.6.17-rc4-mm3.orig/arch/i386/kernel/cpu/proc.c linux-2.6.17-rc4-mm3.my/arch/i386/kernel/cpu/proc.c
--- linux-2.6.17-rc4-mm3.orig/arch/i386/kernel/cpu/proc.c 2006-05-23 19:13:13.000000000 +0200
+++ linux-2.6.17-rc4-mm3/arch/i386/kernel/cpu/proc.c 2006-05-22 17:42:41.000000000 +0200
@@ -18,7 +18,7 @@
* applications want to get the raw CPUID data, they should access
* /dev/cpu/<cpu_nr>/cpuid instead.
*/
- static char *x86_cap_flags[] = {
+ static const char * const x86_cap_flags[] = {
/* Intel-defined */
"fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
"cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
@@ -62,7 +62,7 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
};
- static char *x86_power_flags[] = {
+ static const char * const x86_power_flags[] = {
"ts", /* temperature sensor */
"fid", /* frequency id control */
"vid", /* voltage id control */
reply other threads:[~2006-05-23 18:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060523180732.GD24461@rhlx01.fht-esslingen.de \
--to=andi@rhlx01.fht-esslingen.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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®