]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: lustre: obdclass: Add 'const' to char* array
authorDafna Hirschfeld <dafna3@gmail.com>
Sun, 4 Mar 2018 20:09:33 +0000 (22:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Mar 2018 12:01:11 +0000 (04:01 -0800)
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 <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/cl_object.c

index 3b683b774fefec00299dadd2cf6d6a4a9d8ff982..9ca29a26a38b4b2e0ae314a88303eb261d495908 100644 (file)
@@ -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"
index 7b18d775b001297e1aa75643d9d00641688de4de..7809f6ae1809e79bfc2d70b1c373580477eeaf5b 100644 (file)
@@ -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",