[PATCH 1/2] arm64: Constify hwcap name string arrays

From: Dave Martin
Date: Thu Jul 30 2015 - 11:36:25 EST


The hwcap string arrays used for generating the contents of
/proc/cpuinfo are currently arrays of non-const pointers.

There's no need for these pointers to be mutable, so this patch makes
them const so that they can be moved to .rodata.

Signed-off-by: Dave Martin <Dave.Martin@xxxxxxx>
---
arch/arm64/kernel/cpuinfo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 349ebf7..20b7748 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -48,7 +48,7 @@ static char *icache_policy_str[] = {

unsigned long __icache_flags;

-static const char *hwcap_str[] = {
+static const char *const hwcap_str[] = {
"fp",
"asimd",
"evtstrm",
@@ -63,7 +63,7 @@ static const char *hwcap_str[] = {
};

#ifdef CONFIG_COMPAT
-static const char *compat_hwcap_str[] = {
+static const char *const compat_hwcap_str[] = {
"swp",
"half",
"thumb",
@@ -88,7 +88,7 @@ static const char *compat_hwcap_str[] = {
"evtstrm"
};

-static const char *compat_hwcap2_str[] = {
+static const char *const compat_hwcap2_str[] = {
"aes",
"pmull",
"sha1",
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/