From 520a7c8a85e12a92ef88f99ad623a5dc1422b0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 21 Apr 2022 14:27:51 +0200 Subject: [PATCH] linux: module: zfs: sysfs: constify types and attrs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #13357 --- module/os/linux/zfs/zfs_sysfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/os/linux/zfs/zfs_sysfs.c b/module/os/linux/zfs/zfs_sysfs.c index 6f71382cf7..aa21ba5cfd 100644 --- a/module/os/linux/zfs/zfs_sysfs.c +++ b/module/os/linux/zfs/zfs_sysfs.c @@ -226,7 +226,7 @@ zfs_kobj_add(zfs_mod_kobj_t *zkobj, struct kobject *parent, const char *name) /* * Each zfs property has these common attributes */ -static const char *zprop_attrs[] = { +static const char *const zprop_attrs[] = { "type", "readonly", "setonce", @@ -239,7 +239,7 @@ static const char *zprop_attrs[] = { #define ZFS_PROP_ATTR_COUNT ARRAY_SIZE(zprop_attrs) #define ZPOOL_PROP_ATTR_COUNT (ZFS_PROP_ATTR_COUNT - 1) -static const char *zprop_types[] = { +static const char *const zprop_types[] = { "number", "string", "index", @@ -250,7 +250,7 @@ typedef struct zfs_type_map { const char *ztm_name; } zfs_type_map_t; -static zfs_type_map_t type_map[] = { +static const zfs_type_map_t type_map[] = { {ZFS_TYPE_FILESYSTEM, "filesystem"}, {ZFS_TYPE_SNAPSHOT, "snapshot"}, {ZFS_TYPE_VOLUME, "volume"}, @@ -371,7 +371,7 @@ pool_property_show(struct kobject *kobj, struct attribute *attr, char *buf) * A user process can easily check if the running zfs kernel module * supports the new feature. */ -static const char *zfs_kernel_features[] = { +static const char *const zfs_kernel_features[] = { /* --> Add new kernel features here */ "com.delphix:vdev_initialize", "org.zfsonlinux:vdev_trim", @@ -439,7 +439,7 @@ zfs_kernel_features_init(zfs_mod_kobj_t *zfs_kobj, struct kobject *parent) /* * Each pool feature has these common attributes */ -static const char *pool_feature_attrs[] = { +static const char *const pool_feature_attrs[] = { "description", "guid", "uname",