From 57c194028650178533c90d909f640da6801b86a7 Mon Sep 17 00:00:00 2001 From: Dafna Hirschfeld Date: Sun, 4 Mar 2018 22:09:33 +0200 Subject: [PATCH] staging: lustre: obdclass: Add 'const' to char* array Replace 'const char*' arrays with 'const char * const' since the values in the arrays are not changed. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index 3b683b774fef..9ca29a26a38b 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c @@ -224,7 +224,7 @@ EXPORT_SYMBOL(cl_lock_release); const char *cl_lock_mode_name(const enum cl_lock_mode mode) { - static const char *names[] = { + static const char * const names[] = { [CLM_READ] = "R", [CLM_WRITE] = "W", [CLM_GROUP] = "G" diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index 7b18d775b001..7809f6ae1809 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -495,7 +495,7 @@ static struct cache_stats cl_env_stats = { int cl_site_stats_print(const struct cl_site *site, struct seq_file *m) { size_t i; - static const char *pstate[] = { + static const char * const pstate[] = { [CPS_CACHED] = "c", [CPS_OWNED] = "o", [CPS_PAGEOUT] = "w", -- 2.39.5