* [PATCH] zonefs: make kobj_type structure constant
@ 2023-02-10  2:14 Thomas Weißschuh
  2023-02-10 11:37 ` Johannes Thumshirn
  2023-02-12 23:09 ` Damien Le Moal
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2023-02-10  2:14 UTC (permalink / raw)
  To: Damien Le Moal, Naohiro Aota, Johannes Thumshirn
  Cc: linux-fsdevel, linux-kernel, Thomas Weißschuh
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 definition to prevent
modification at runtime.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 fs/zonefs/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index 9920689dc098..8ccb65c2b419 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -79,7 +79,7 @@ static const struct sysfs_ops zonefs_sysfs_attr_ops = {
 	.show	= zonefs_sysfs_attr_show,
 };
 
-static struct kobj_type zonefs_sb_ktype = {
+static const struct kobj_type zonefs_sb_ktype = {
 	.default_groups = zonefs_sysfs_groups,
 	.sysfs_ops	= &zonefs_sysfs_attr_ops,
 	.release	= zonefs_sysfs_sb_release,
---
base-commit: e544a07438522ab3688416e6e2e34bf0ee6d8755
change-id: 20230210-kobj_type-zonefs-a124912033b3
Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply related	[flat|nested] 3+ messages in thread- * Re: [PATCH] zonefs: make kobj_type structure constant
  2023-02-10  2:14 [PATCH] zonefs: make kobj_type structure constant Thomas Weißschuh
@ 2023-02-10 11:37 ` Johannes Thumshirn
  2023-02-12 23:09 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2023-02-10 11:37 UTC (permalink / raw)
  To: Thomas Weißschuh, Damien Le Moal, Naohiro Aota,
	Johannes Thumshirn
  Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply	[flat|nested] 3+ messages in thread 
- * Re: [PATCH] zonefs: make kobj_type structure constant
  2023-02-10  2:14 [PATCH] zonefs: make kobj_type structure constant Thomas Weißschuh
  2023-02-10 11:37 ` Johannes Thumshirn
@ 2023-02-12 23:09 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2023-02-12 23:09 UTC (permalink / raw)
  To: Thomas Weißschuh, Naohiro Aota, Johannes Thumshirn
  Cc: linux-fsdevel, linux-kernel
On 2/10/23 11:14, Thomas Weißschuh wrote:
> 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 definition to prevent
> modification at runtime.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Applied to for-6.3. Thanks !
-- 
Damien Le Moal
Western Digital Research
^ permalink raw reply	[flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-12 23:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10  2:14 [PATCH] zonefs: make kobj_type structure constant Thomas Weißschuh
2023-02-10 11:37 ` Johannes Thumshirn
2023-02-12 23:09 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).