linux/drivers/s390/crypto
Greg Kroah-Hartman d69d804845 driver core: have match() callback in struct bus_type take a const *
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Alex Elder <elder@kernel.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 15:16:54 +02:00
..
ap_bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ap_bus.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ap_card.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
ap_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
ap_queue.c s390/ap: rename ap debug configuration option 2024-04-09 17:29:56 +02:00
Makefile s390/ap: modularize ap bus 2024-04-09 17:29:56 +02:00
pkey_api.c s390/pkey: Wipe copies of protected- and secure-keys 2024-05-14 20:16:34 +02:00
vfio_ap_debug.h s390-vfio-ap: introduces s390 kernel debug feature for vfio_ap device driver 2022-02-06 23:31:29 +01:00
vfio_ap_drv.c s390/vfio-ap: make matrix_bus const 2024-02-09 13:58:16 +01:00
vfio_ap_ops.c s390/vfio-ap: Add write support to sysfs attr ap_config 2024-04-22 12:49:17 +02:00
vfio_ap_private.h s390/vfio-ap: Add write support to sysfs attr ap_config 2024-04-22 12:49:17 +02:00
zcrypt_api.c s390/zcrypt: Use kvcalloc() instead of kvmalloc_array() 2024-05-17 10:43:43 +02:00
zcrypt_api.h s390/zcrypt: improve zcrypt retry behavior 2024-03-07 14:41:15 +01:00
zcrypt_card.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00
zcrypt_cca_key.h s390/zcrypt: rework arrays with length zero occurrences 2023-04-19 16:47:31 +02:00
zcrypt_ccamisc.c s390/zcrypt: Use kvcalloc() instead of kvmalloc_array() 2024-05-17 10:43:43 +02:00
zcrypt_ccamisc.h s390: fix various typos 2023-07-03 11:19:42 +02:00
zcrypt_cex2a.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2a.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex4.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
zcrypt_cex4.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_ep11misc.c s390/zcrypt: Use kvcalloc() instead of kvmalloc_array() 2024-05-17 10:43:43 +02:00
zcrypt_ep11misc.h s390/zcrypt_ep11misc: support API ordinal 6 with empty pin-blob 2023-08-18 15:07:57 +02:00
zcrypt_error.h s390/zcrypt: improve zcrypt retry behavior 2024-03-07 14:41:15 +01:00
zcrypt_msgtype6.c s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_msgtype6.h s390/zcrypt: code cleanup 2022-04-25 13:54:14 +02:00
zcrypt_msgtype50.c s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_msgtype50.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_queue.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00