driver core: class: allow struct class to be static
Get series with b4
b4 am 2023040244-duffel-pushpin-f738@gregkhVersions newest first
- v1 Latest5 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | driver core: class: mark class_release() as taking a const *drivers/ drivers/ include/ | +3 | 1 reply | |
| 2/5 | driver core: class: make class_register() take a const *drivers/ drivers/ include/ | +5 | 1 reply | |
| 3/5 | driver core: class: mark the struct class in struct class_interface constantdrivers/ include/ | +2 | 1 reply | |
| 4/5 | driver core: class: remove struct class_interface * from callbacksdrivers/ drivers/ drivers/ +10 more | +28 | 3 replies | |
| 5/5 | tty: make tty_class a static const structuredrivers/ drivers/ drivers/ +1 more | +14 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Slaby | Logan Gunthorpe | Rafael J. Wysocki | Guenter Roeck |
|---|---|---|---|---|
| 1/5 | A-b | |||
| 2/5 | A-b | |||
| 3/5 | A-b | |||
| 4/5 | A-b | A-b | A-b | |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/5] driver core: class: allow struct class to be static
There's been a semi-slow drip of driver core struct class changes recently, and here's the final bit to the core that makes it possible for 'struct class' to be moved into read-only memory. And as proof, the last patch in the series does just that for the tty classes.
After this series, there's some tree-wide cleanups needed to move away from the class_create() api back to class_register() to move the structures into read-only memory. The class_create() api was a good idea when it was created (as struct class was a dynamic structure), but that got changed a long time ago and that's not necessary anymore. But that can wait for after 6.4-rc1 is out as they can all go through the different relevant subsystems if wanted.
All of these apply on top of my latest driver-core.git driver-core-next branch (or linux-next), as they require the current set of struct class and struct bus_type reworks and have been tested locally (I'm typing this and will send them out on a kernel running these changes).
Greg Kroah-Hartman (5):
driver core: class: mark class_release() as taking a const * driver core: class: make class_register() take a const * driver core: class: mark the struct class in struct class_interface
constant
driver core: class: remove struct class_interface * from callbacks
tty: make tty_class a static const structure
drivers/base/base.h | 2 +- drivers/base/class.c | 14 +++++++------- drivers/base/core.c | 10 ++++------ drivers/hwmon/drivetemp.c | 4 ++-- drivers/net/rionet.c | 3 +-- drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 6 ++---- drivers/pcmcia/cs.c | 2 +- drivers/pcmcia/ds.c | 6 ++---- drivers/pcmcia/rsrc_nonstatic.c | 6 ++---- drivers/rapidio/devices/rio_mport_cdev.c | 7 ++----- drivers/rapidio/rio_cm.c | 8 ++------ drivers/scsi/ses.c | 6 ++---- drivers/scsi/sg.c | 8 ++++---- drivers/tty/pty.c | 2 +- drivers/tty/tty_io.c | 24 +++++++++++------------- drivers/tty/vt/vt.c | 2 +- include/linux/device/class.h | 10 +++++----- include/linux/tty.h | 2 +- kernel/time/alarmtimer.c | 3 +-- 19 files changed, 52 insertions(+), 73 deletions(-)
Signature · 1 line
2.40.0