Re: [PATCH] driver core: class: mark the struct class for sysfs callbacks as constant

2023-03-27 Thread Luis Chamberlain
On Sat, Mar 25, 2023 at 09:45:37AM +0100, Greg Kroah-Hartman wrote: > struct class should never be modified in a sysfs callback as there is > nothing in the structure to modify, and frankly, the structure is almost > never used in a sysfs callback, so mark it as constant to allow struct > class to

[PATCH] driver core: class: mark the struct class for sysfs callbacks as constant

2023-03-25 Thread Greg Kroah-Hartman
struct class should never be modified in a sysfs callback as there is nothing in the structure to modify, and frankly, the structure is almost never used in a sysfs callback, so mark it as constant to allow struct class to be moved to read-only memory. While we are touching all class sysfs callbac