linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
@ 2023-02-09  3:20 Thomas Weißschuh
  2023-02-10 21:40 ` patchwork-bot+f2fs
  2023-02-13  9:25 ` Chao Yu
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2023-02-09  3:20 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu
  Cc: Thomas Weißschuh, linux-kernel, linux-f2fs-devel

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>
---
 fs/f2fs/sysfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 83a366f3ee80..43f1ff1b92ba 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1129,13 +1129,13 @@ static const struct sysfs_ops f2fs_attr_ops = {
 	.store	= f2fs_attr_store,
 };
 
-static struct kobj_type f2fs_sb_ktype = {
+static const struct kobj_type f2fs_sb_ktype = {
 	.default_groups = f2fs_groups,
 	.sysfs_ops	= &f2fs_attr_ops,
 	.release	= f2fs_sb_release,
 };
 
-static struct kobj_type f2fs_ktype = {
+static const struct kobj_type f2fs_ktype = {
 	.sysfs_ops	= &f2fs_attr_ops,
 };
 
@@ -1143,7 +1143,7 @@ static struct kset f2fs_kset = {
 	.kobj	= {.ktype = &f2fs_ktype},
 };
 
-static struct kobj_type f2fs_feat_ktype = {
+static const struct kobj_type f2fs_feat_ktype = {
 	.default_groups = f2fs_feat_groups,
 	.sysfs_ops	= &f2fs_attr_ops,
 };
@@ -1184,7 +1184,7 @@ static const struct sysfs_ops f2fs_stat_attr_ops = {
 	.store	= f2fs_stat_attr_store,
 };
 
-static struct kobj_type f2fs_stat_ktype = {
+static const struct kobj_type f2fs_stat_ktype = {
 	.default_groups = f2fs_stat_groups,
 	.sysfs_ops	= &f2fs_stat_attr_ops,
 	.release	= f2fs_stat_kobj_release,
@@ -1211,7 +1211,7 @@ static const struct sysfs_ops f2fs_feature_list_attr_ops = {
 	.show	= f2fs_sb_feat_attr_show,
 };
 
-static struct kobj_type f2fs_feature_list_ktype = {
+static const struct kobj_type f2fs_feature_list_ktype = {
 	.default_groups = f2fs_sb_feat_groups,
 	.sysfs_ops	= &f2fs_feature_list_attr_ops,
 	.release	= f2fs_feature_list_kobj_release,

---
base-commit: 0983f6bf2bfc0789b51ddf7315f644ff4da50acb
change-id: 20230209-kobj_type-f2fs-ba2302c4b920

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-09  3:20 [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant Thomas Weißschuh
@ 2023-02-10 21:40 ` patchwork-bot+f2fs
  2023-02-13  9:25 ` Chao Yu
  1 sibling, 0 replies; 8+ messages in thread
From: patchwork-bot+f2fs @ 2023-02-10 21:40 UTC (permalink / raw)
  To: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=3Clinux=40weissschuh=2Enet=3E?=
  Cc: jaegeuk, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Thu, 09 Feb 2023 03:20:10 +0000 you 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 definitions to prevent
> modification at runtime.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> 
> [...]

Here is the summary with links:
  - [f2fs-dev] f2fs: make kobj_type structures constant
    https://git.kernel.org/jaegeuk/f2fs/c/663bb23cc1ac

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-09  3:20 [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant Thomas Weißschuh
  2023-02-10 21:40 ` patchwork-bot+f2fs
@ 2023-02-13  9:25 ` Chao Yu
  2023-02-13 17:51   ` Jaegeuk Kim
  1 sibling, 1 reply; 8+ messages in thread
From: Chao Yu @ 2023-02-13  9:25 UTC (permalink / raw)
  To: Thomas Weißschuh, Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel

On 2023/2/9 11:20, 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 definitions to prevent
> modification at runtime.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-13  9:25 ` Chao Yu
@ 2023-02-13 17:51   ` Jaegeuk Kim
  2023-02-14  1:42     ` Chao Yu
  0 siblings, 1 reply; 8+ messages in thread
From: Jaegeuk Kim @ 2023-02-13 17:51 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, Thomas Weißschuh, linux-f2fs-devel

On 02/13, Chao Yu wrote:
> On 2023/2/9 11:20, 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 definitions to prevent
> > modification at runtime.
> > 
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> 
> Reviewed-by: Chao Yu <chao@kernel.org>

Hi Chao,

Note that, next time, I won't apply/modify any patches merged in -dev,
unless it has a problem.

Thanks,

> 
> Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-13 17:51   ` Jaegeuk Kim
@ 2023-02-14  1:42     ` Chao Yu
  2023-02-14 18:07       ` Jaegeuk Kim
  0 siblings, 1 reply; 8+ messages in thread
From: Chao Yu @ 2023-02-14  1:42 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, Thomas Weißschuh, linux-f2fs-devel

On 2023/2/14 1:51, Jaegeuk Kim wrote:
> On 02/13, Chao Yu wrote:
>> On 2023/2/9 11:20, 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 definitions to prevent
>>> modification at runtime.
>>>
>>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>>
>> Reviewed-by: Chao Yu <chao@kernel.org>
> 
> Hi Chao,
> 
> Note that, next time, I won't apply/modify any patches merged in -dev,
> unless it has a problem.

Hi Jaegeuk,

Oh, any particular reason, to avoid unneeded commit id change when the time is
close to merge window?

Is there any period of grace before merging patches from dev-test branch into dev
branch? Maybe a week is reasonable? so I may have time to catch up in time.

Thanks,

> 
> Thanks,
> 
>>
>> Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-14  1:42     ` Chao Yu
@ 2023-02-14 18:07       ` Jaegeuk Kim
  2023-02-15 14:43         ` Chao Yu
  0 siblings, 1 reply; 8+ messages in thread
From: Jaegeuk Kim @ 2023-02-14 18:07 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, Thomas Weißschuh, linux-f2fs-devel

On 02/14, Chao Yu wrote:
> On 2023/2/14 1:51, Jaegeuk Kim wrote:
> > On 02/13, Chao Yu wrote:
> > > On 2023/2/9 11:20, 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 definitions to prevent
> > > > modification at runtime.
> > > > 
> > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > > 
> > > Reviewed-by: Chao Yu <chao@kernel.org>
> > 
> > Hi Chao,
> > 
> > Note that, next time, I won't apply/modify any patches merged in -dev,
> > unless it has a problem.
> 
> Hi Jaegeuk,
> 
> Oh, any particular reason, to avoid unneeded commit id change when the time is
> close to merge window?

Hi Chao,

I'm trying to avoid breaking the -next branch.

> 
> Is there any period of grace before merging patches from dev-test branch into dev
> branch? Maybe a week is reasonable? so I may have time to catch up in time.

No rule, but I'm trying to wait for several days while running my local tests.
If the patch looks okay, sometimes I'll queue it right away.

Thanks,

> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> > > 
> > > Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-14 18:07       ` Jaegeuk Kim
@ 2023-02-15 14:43         ` Chao Yu
  2023-02-15 17:46           ` Jaegeuk Kim
  0 siblings, 1 reply; 8+ messages in thread
From: Chao Yu @ 2023-02-15 14:43 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-kernel, Thomas Weißschuh, linux-f2fs-devel

On 2023/2/15 2:07, Jaegeuk Kim wrote:
> On 02/14, Chao Yu wrote:
>> On 2023/2/14 1:51, Jaegeuk Kim wrote:
>>> On 02/13, Chao Yu wrote:
>>>> On 2023/2/9 11:20, 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 definitions to prevent
>>>>> modification at runtime.
>>>>>
>>>>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>>>>
>>>> Reviewed-by: Chao Yu <chao@kernel.org>
>>>
>>> Hi Chao,
>>>
>>> Note that, next time, I won't apply/modify any patches merged in -dev,
>>> unless it has a problem.
>>
>> Hi Jaegeuk,
>>
>> Oh, any particular reason, to avoid unneeded commit id change when the time is
>> close to merge window?
> 
> Hi Chao,
> 
> I'm trying to avoid breaking the -next branch.

Jaegeuk, so why do we need to avoid breaking -next branch? I didn't get it. :-(

> 
>>
>> Is there any period of grace before merging patches from dev-test branch into dev
>> branch? Maybe a week is reasonable? so I may have time to catch up in time.
> 
> No rule, but I'm trying to wait for several days while running my local tests.
> If the patch looks okay, sometimes I'll queue it right away.

Sure, not problem.

Thanks,

> 
> Thanks,
> 
>>
>> Thanks,
>>
>>>
>>> Thanks,
>>>
>>>>
>>>> Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant
  2023-02-15 14:43         ` Chao Yu
@ 2023-02-15 17:46           ` Jaegeuk Kim
  0 siblings, 0 replies; 8+ messages in thread
From: Jaegeuk Kim @ 2023-02-15 17:46 UTC (permalink / raw)
  To: Chao Yu; +Cc: linux-kernel, Thomas Weißschuh, linux-f2fs-devel

On 02/15, Chao Yu wrote:
> On 2023/2/15 2:07, Jaegeuk Kim wrote:
> > On 02/14, Chao Yu wrote:
> > > On 2023/2/14 1:51, Jaegeuk Kim wrote:
> > > > On 02/13, Chao Yu wrote:
> > > > > On 2023/2/9 11:20, 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 definitions to prevent
> > > > > > modification at runtime.
> > > > > > 
> > > > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > > > > 
> > > > > Reviewed-by: Chao Yu <chao@kernel.org>
> > > > 
> > > > Hi Chao,
> > > > 
> > > > Note that, next time, I won't apply/modify any patches merged in -dev,
> > > > unless it has a problem.
> > > 
> > > Hi Jaegeuk,
> > > 
> > > Oh, any particular reason, to avoid unneeded commit id change when the time is
> > > close to merge window?
> > 
> > Hi Chao,
> > 
> > I'm trying to avoid breaking the -next branch.
> 
> Jaegeuk, so why do we need to avoid breaking -next branch? I didn't get it. :-(

That's not for linux-next, but my -next work.

> 
> > 
> > > 
> > > Is there any period of grace before merging patches from dev-test branch into dev
> > > branch? Maybe a week is reasonable? so I may have time to catch up in time.
> > 
> > No rule, but I'm trying to wait for several days while running my local tests.
> > If the patch looks okay, sometimes I'll queue it right away.
> 
> Sure, not problem.
> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> > > 
> > > Thanks,
> > > 
> > > > 
> > > > Thanks,
> > > > 
> > > > > 
> > > > > Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-02-15 17:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09  3:20 [f2fs-dev] [PATCH] f2fs: make kobj_type structures constant Thomas Weißschuh
2023-02-10 21:40 ` patchwork-bot+f2fs
2023-02-13  9:25 ` Chao Yu
2023-02-13 17:51   ` Jaegeuk Kim
2023-02-14  1:42     ` Chao Yu
2023-02-14 18:07       ` Jaegeuk Kim
2023-02-15 14:43         ` Chao Yu
2023-02-15 17:46           ` Jaegeuk Kim

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).