kernel/profile.c: use static const char instead of static char
authorFabian Frederick <fabf@skynet.be>
Fri, 6 Jun 2014 21:37:30 +0000 (14:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2014 23:08:13 +0000 (16:08 -0700)
schedstr, sleepstr and kvmstr are only used in strcmp & strlen

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/profile.c

index c1204e2..54bf5ba 100644 (file)
@@ -52,9 +52,9 @@ static DEFINE_MUTEX(profile_flip_mutex);
 
 int profile_setup(char *str)
 {
-       static char schedstr[] = "schedule";
-       static char sleepstr[] = "sleep";
-       static char kvmstr[] = "kvm";
+       static const char schedstr[] = "schedule";
+       static const char sleepstr[] = "sleep";
+       static const char kvmstr[] = "kvm";
        int par;
 
        if (!strncmp(str, sleepstr, strlen(sleepstr))) {