Messages in this thread Patch in this message | | | Date | Wed, 7 May 2014 22:35:08 +0200 | From | Fabian Frederick <> | Subject | [PATCH 1/1] kernel/profile.c: use static const char instead of static char |
| |
schedstr, sleepstr and kvmstr are only used in strcmp & strlen
Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> --- kernel/profile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/profile.c b/kernel/profile.c index cb980f0..f8132a2 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -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))) { -- 1.8.4.5
| |