From: Dafna Hirschfeld Date: Sun, 4 Mar 2018 20:09:33 +0000 (+0200) Subject: staging: lustre: obdclass: Add 'const' to char* array X-Git-Tag: Ubuntu-5.13.0-19.19~11297^2~287 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=57c194028650178533c90d909f640da6801b86a7;p=mirror_ubuntu-jammy-kernel.git 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 --- 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",