Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2023 at 11:48:10PM -0700, Joe Perches wrote: > On Mon, 2023-10-09 at 22:05 +0200, Max Kellermann wrote: > > On Mon, Oct 9, 2023 at 7:24 PM Guenter Roeck wrote: > > > Also, I don't know why checkpatch is happy with all the > > > > > > const struct attribute_group *const*gro

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Joe Perches
On Mon, 2023-10-09 at 22:05 +0200, Max Kellermann wrote: > On Mon, Oct 9, 2023 at 7:24 PM Guenter Roeck wrote: > > Also, I don't know why checkpatch is happy with all the > > > > const struct attribute_group *const*groups; > > > > instead of > > > > const struct attribute_group

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2023 at 10:05:55PM +0200, Max Kellermann wrote: > On Mon, Oct 9, 2023 at 7:24 PM Guenter Roeck wrote: > > Also, I don't know why checkpatch is happy with all the > > > > const struct attribute_group *const*groups; > > > > instead of > > > > const struct attribute_gr

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Max Kellermann
On Mon, Oct 9, 2023 at 7:26 PM Greg Kroah-Hartman wrote: > "*const*groups"? That's a parsing nightmare, really hard for humans to > read and understand. Doesn't checkpatch complain about this? No, checkpatch does not implement a check/warning for this style (see my other email). There's no rul

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Max Kellermann
On Mon, Oct 9, 2023 at 7:24 PM Guenter Roeck wrote: > Also, I don't know why checkpatch is happy with all the > > const struct attribute_group *const*groups; > > instead of > > const struct attribute_group *const *groups; I found out that checkpatch has no check for this at all; i

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2023 at 07:25:57PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 09, 2023 at 06:57:39PM +0200, Max Kellermann wrote: > > This allows passing arrays of const pointers. The goal is to make > > lots of global variables "const" to allow them to live in the > > ".rodata" section. > >

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Max Kellermann
On Mon, Oct 9, 2023 at 7:26 PM Greg Kroah-Hartman wrote: > I'm all for doing this type of work, but this is going to be rough. You > sent patch 6/7 that hit almost all subsystems at once :( I wasn't sure whether splitting patches was desired. In the past, I was often asked to fold multiple patch

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2023 at 06:57:39PM +0200, Max Kellermann wrote: > This allows passing arrays of const pointers. The goal is to make > lots of global variables "const" to allow them to live in the > ".rodata" section. I'm all for doing this type of work, but this is going to be rough. You sent pa

Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Guenter Roeck
On Mon, Oct 09, 2023 at 06:57:39PM +0200, Max Kellermann wrote: > This allows passing arrays of const pointers. The goal is to make > lots of global variables "const" to allow them to live in the > ".rodata" section. > > Signed-off-by: Max Kellermann In my opinion this touches way too many subs

[PATCH 6/7] fs/sysfs/group: make attribute_group pointers const

2023-10-09 Thread Max Kellermann
This allows passing arrays of const pointers. The goal is to make lots of global variables "const" to allow them to live in the ".rodata" section. Signed-off-by: Max Kellermann --- block/genhd.c | 2 +- drivers/base/base.h | 4 ++-- drivers/base/bus.c