]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64: Constify hwcap name string arrays
authorDave Martin <Dave.Martin@arm.com>
Thu, 30 Jul 2015 15:36:25 +0000 (16:36 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 21 Oct 2015 14:36:00 +0000 (15:36 +0100)
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@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpuinfo.c

index 789fbea92b7957a0f5f8f180f0d010fc425f4dbd..706679d0a0b4227c4a7267cd85142192576d7ab3 100644 (file)
@@ -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",
@@ -62,7 +62,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",
@@ -87,7 +87,7 @@ static const char *compat_hwcap_str[] = {
        "evtstrm"
 };
 
-static const char *compat_hwcap2_str[] = {
+static const char *const compat_hwcap2_str[] = {
        "aes",
        "pmull",
        "sha1",