Re: [PATCH] mm/swap_state: Constify static struct attribute_group

2021-02-01 Thread Miaohe Lin
Hi: On 2021/2/2 7:32, Rikard Falkeborn wrote: > The only usage of swap_attr_group is to pass its address to > sysfs_create_group() which takes a pointer to const attribute_group. > Make it const to allow the compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Looks good

Re: [PATCH] mm/swap_state: Constify static struct attribute_group

2021-02-01 Thread Huang, Ying
Rikard Falkeborn writes: > The only usage of swap_attr_group is to pass its address to > sysfs_create_group() which takes a pointer to const attribute_group. > Make it const to allow the compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Looks good to me. Acked-by:

Re: [PATCH] mm/swap_state: Constify static struct attribute_group

2021-02-01 Thread Amy Parker
On Mon, Feb 1, 2021 at 3:37 PM Rikard Falkeborn wrote: > > The only usage of swap_attr_group is to pass its address to > sysfs_create_group() which takes a pointer to const attribute_group. > Make it const to allow the compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn >

[PATCH] mm/swap_state: Constify static struct attribute_group

2021-02-01 Thread Rikard Falkeborn
The only usage of swap_attr_group is to pass its address to sysfs_create_group() which takes a pointer to const attribute_group. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- mm/swap_state.c | 2 +- 1 file changed, 1 insertion(+), 1