Re: [PATCH] PM: Constify static struct attribute_group

2021-02-12 Thread Rafael J. Wysocki
On Mon, Feb 1, 2021 at 11:58 PM Rikard Falkeborn wrote: > > The only usage of suspend_attr_group is to put its address in an array of > pointers to const attribute_group structs. Make it const to allow the > compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn > --- >

[PATCH] PM: Constify static struct attribute_group

2021-02-01 Thread Rikard Falkeborn
The only usage of suspend_attr_group is to put its address in an array of pointers to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- kernel/power/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)