mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] kernel/profile.c: use static const char instead of static char
@ 2014-05-07 20:35 Fabian Frederick
  2014-05-07 22:30 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2014-05-07 20:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Paul Gortmaker

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-07 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 20:35 [PATCH 1/1] kernel/profile.c: use static const char instead of static char Fabian Frederick
2014-05-07 22:30 ` Andrew Morton
2014-05-07 22:35   ` Joe Perches

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®