diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-02-09 18:56:48 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-02-10 08:59:48 -0800 |
commit | 2ee8333529857a702475ce36d3af3ecbbcf5af5a (patch) | |
tree | daf47038cc2461afc18f6f2f6779d682252bde2d /fs/xfs/xfs_error.c | |
parent | 167ce4cbfa370114fee61ad5b58e401d95e2d5cd (diff) | |
download | linux-2ee8333529857a702475ce36d3af3ecbbcf5af5a.tar.gz linux-2ee8333529857a702475ce36d3af3ecbbcf5af5a.tar.bz2 linux-2ee8333529857a702475ce36d3af3ecbbcf5af5a.zip |
xfs: make kobj_type structures constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.
Take advantage of this to constify the structure definitions to prevent
modification at runtime.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r-- | fs/xfs/xfs_error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index ae082808cfed..b2cbbba3e15a 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c @@ -228,7 +228,7 @@ static struct attribute *xfs_errortag_attrs[] = { }; ATTRIBUTE_GROUPS(xfs_errortag); -static struct kobj_type xfs_errortag_ktype = { +static const struct kobj_type xfs_errortag_ktype = { .release = xfs_sysfs_release, .sysfs_ops = &xfs_errortag_sysfs_ops, .default_groups = xfs_errortag_groups, |