[dm-devel] [PATCH 38/39] dm: declare variables static when sensible
Mike Snitzer
snitzer at kernel.org
Mon Feb 13 20:14:00 UTC 2023
From: Heinz Mauelshagen <heinzm at redhat.com>
Signed-off-by: Heinz Mauelshagen <heinzm at redhat.com>
Signed-off-by: Mike Snitzer <snitzer at kernel.org>
---
drivers/md/dm-cache-target.c | 2 +-
drivers/md/dm-thin.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 74ad5f27a257..0f16c922c440 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -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"
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index c8d3b20401f4..7fe05ee39ba3 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -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",
--
2.37.0 (Apple Git-136)
More information about the dm-devel
mailing list