summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2015-11-06 16:29:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 17:50:42 -0800
commit69e18f4dbedfbf208452e9da9979c92da30d2442 (patch)
treea2052fea74be8c0180a6697b8d61c70920ed6095 /include
parentc99b42c3529e5e1bff00f68250dc869f7de3bd5f (diff)
downloadlinux-69e18f4dbedfbf208452e9da9979c92da30d2442.tar.bz2
zpool: remove redundant zpool->type string, const-ify zpool_get_type
Make the return type of zpool_get_type const; the string belongs to the zpool driver and should not be modified. Remove the redundant type field in the struct zpool; it is private to zpool.c and isn't needed since ->driver->type can be used directly. Add comments indicating strings must be null-terminated. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Seth Jennings <sjennings@variantweb.net> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/zpool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/zpool.h b/include/linux/zpool.h
index 42f8ec992452..1f405bee3cd5 100644
--- a/include/linux/zpool.h
+++ b/include/linux/zpool.h
@@ -41,7 +41,7 @@ bool zpool_has_pool(char *type);
struct zpool *zpool_create_pool(char *type, char *name,
gfp_t gfp, const struct zpool_ops *ops);
-char *zpool_get_type(struct zpool *pool);
+const char *zpool_get_type(struct zpool *pool);
void zpool_destroy_pool(struct zpool *pool);