dm: declare variables static when sensible
authorHeinz Mauelshagen <heinzm@redhat.com>
Tue, 7 Feb 2023 22:15:36 +0000 (23:15 +0100)
committerMike Snitzer <snitzer@kernel.org>
Tue, 14 Feb 2023 19:23:07 +0000 (14:23 -0500)
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-cache-target.c
drivers/md/dm-thin.c

index 6ee3599..2319570 100644 (file)
@@ -859,7 +859,7 @@ static const char *cache_device_name(struct cache *cache)
 
 static void notify_mode_switch(struct cache *cache, enum cache_metadata_mode mode)
 {
-       const char *descs[] = {
+       static const char *descs[] = {
                "write",
                "read-only",
                "fail"
index 0e7f4d0..affd91a 100644 (file)
@@ -294,7 +294,7 @@ static enum pool_mode get_pool_mode(struct pool *pool)
 
 static void notify_of_pool_mode_change(struct pool *pool)
 {
-       const char *descs[] = {
+       static const char *descs[] = {
                "write",
                "out-of-data-space",
                "read-only",