* [PATCH] dm thin: make const array descs static
@ 2022-10-18 15:48 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2022-10-18 15:48 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, dm-devel; +Cc: kernel-janitors, linux-kernel
Don't populate the read-only const array ramp_base on the stack but
instead make it static. Add in a const to clean up checkpatch warning
too since the data and the pointer are const. Also makes the object
code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/md/dm-thin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index e76c96c760a9..d228177fdf35 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -293,7 +293,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 * const descs[] = {
"write",
"out-of-data-space",
"read-only",
--
2.37.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-18 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 15:48 [PATCH] dm thin: make const array descs static Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®