From: Mike Frysinger Date: Thu, 26 May 2011 23:25:51 +0000 (-0700) Subject: proc: constify status array X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e130aa70f438855b4a0e13a5249951da001798d4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git proc: constify status array No need for this local array to be writable, so mark it const. Signed-off-by: Mike Frysinger Cc: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/array.c b/fs/proc/array.c index 5e4f776b0917..9b45ee84fbcc 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -131,7 +131,7 @@ static inline void task_name(struct seq_file *m, struct task_struct *p) * you can test for combinations of others with * simple bit tests. */ -static const char *task_state_array[] = { +static const char * const task_state_array[] = { "R (running)", /* 0 */ "S (sleeping)", /* 1 */ "D (disk sleep)", /* 2 */ @@ -147,7 +147,7 @@ static const char *task_state_array[] = { static inline const char *get_task_state(struct task_struct *tsk) { unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state; - const char **p = &task_state_array[0]; + const char * const *p = &task_state_array[0]; BUILD_BUG_ON(1 + ilog2(TASK_STATE_MAX) != ARRAY_SIZE(task_state_array));