lkml.org 
[lkml]   [2019]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 17/17] dm: Fix const confusion in dm
Date
From: Andi Kleen <ak@linux.intel.com>

A non const pointer to const cannot be marked initconst.
Mark the array actually const.

Cc: helen.koike@collabora.com
Cc: snitzer@redhat.com
Cc: wad@chromium.org
Cc: keescook@chromium.org
Cc: enric.balletbo@collabora.com
Fixes: 6bbc923dfcf5 dm: add support to directly boot to a mapped device
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
drivers/md/dm-init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-init.c b/drivers/md/dm-init.c
index b53f30f16b4d..4b76f84424c3 100644
--- a/drivers/md/dm-init.c
+++ b/drivers/md/dm-init.c
@@ -36,7 +36,7 @@ struct dm_device {
struct list_head list;
};

-const char *dm_allowed_targets[] __initconst = {
+const char * const dm_allowed_targets[] __initconst = {
"crypt",
"delay",
"linear",
--
2.20.1
\
 
 \ /
  Last update: 2019-03-21 23:02    [W:0.296 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site