2019-05-19 13:08:20 +01:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2008-09-01 01:48:52 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-24 08:46:01 +02:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2012-12-21 15:13:49 -08:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2024-02-13 15:54:04 +01:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:43:02 -04:00
|
|
|
|
2017-02-01 14:09:26 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-08 08:46:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-28 12:36:39 +00:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2017-02-01 14:09:26 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-01 14:09:26 -05:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-21 22:19:55 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-09-19 09:42:26 -04:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-09-19 09:42:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-08 13:02:55 +02:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
2021-11-22 14:06:14 +01:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-22 14:06:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2021-11-22 14:06:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-21 17:01:13 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2019-11-28 15:48:10 +01:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2019-01-03 09:19:48 +08:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-06 13:20:38 -08:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-06 13:20:38 -08:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
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|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-26 13:18:00 +01:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-08 08:46:51 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-08 08:46:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-22 21:19:53 +02:00
|
|
|
|
2025-03-13 09:23:18 +05:30
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-08-24 22:05:44 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-07 22:24:39 +09:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sunvdc: unmap LDC cookies when the descriptor send fails
__send_request() maps the request's pages into the LDC channel's map
table (ldc_map_sg()), fills in the descriptor and marks it
VIO_DESC_READY before ringing the doorbell via __vdc_tx_trigger().
When the trigger fails, the error path only prints a message: the
descriptor stays READY and the cookies are never unmapped. The
mapping is normally released in vdc_end_one() when the peer completes
the descriptor - but a descriptor whose doorbell was never sent will
never complete, and since dr->prod is not advanced on failure, the
reset path (vdc_requeue_inflight(), which walks [cons, prod)) never
visits it either. The map table entries are leaked permanently.
Since commit a11f6ca9aef9 ("sunvdc: Do not spin in an infinite loop
when vio_ldc_send() returns EAGAIN") trigger failures occur in
practice under load, so every resulting I/O error also leaks one
request's worth of entries from the fixed-size (8192 entries per
channel) map table. Because the allocator hands out contiguous
ranges, fragmentation makes large multi-segment requests fail first
as the table drains, until ldc_map_sg() fails permanently and the
disk is dead until reboot.
It also makes any retry-based recovery unusable: requeuing the
request on -EAGAIN remaps the pages on every attempt, overwriting
desc->cookies and orphaning the previous mapping, so the table
drains at the retry rate. This is the memory exhaustion observed
when the requeue approach was first tested in October 2025.
Roll back on failure: unmap the cookies, mark the descriptor FREE
again and clear the request entry. If the trigger failed with
-ENOTCONN, __vdc_tx_trigger() has already reset the port, which
tears down and reallocates both the dring and the LDC channel
including its map table - nothing to roll back, and the stale
descriptor must not be touched.
Fixes: a11f6ca9aef9 ("sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN")
Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://github.com/sparclinux/issues/issues/2
Signed-off-by: Stian Halseth <stian@itx.no>
Link: https://patch.msgid.link/20260901173947.3292110-2-stian@itx.no
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-09-01 19:39:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:15 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-09-01 19:39:46 +02:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-09-19 09:43:02 -04:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-09-19 09:43:02 -04:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-09-19 09:43:02 -04:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-09-01 19:39:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-14 11:49:01 -08:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2024-02-15 08:02:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-17 08:04:41 +02:00
|
|
|
|
2024-02-15 08:02:52 +01:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2017-02-01 14:09:26 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:26 -04:00
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2014-09-19 09:42:26 -04:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
2024-12-19 07:01:59 +01:00
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-15 08:02:52 +01:00
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2021-11-03 16:04:31 -07:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2021-11-03 16:04:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2021-11-03 16:04:31 -07:00
|
|
|
|
|
|
|
|
|
2022-06-19 08:05:52 +02:00
|
|
|
|
2021-11-03 16:04:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 15:13:49 -08:00
|
|
|
|
2007-07-17 21:46:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
driver core: Constify API device_find_child() and adapt for various usages
Constify the following API:
struct device *device_find_child(struct device *dev, void *data,
int (*match)(struct device *dev, void *data));
To :
struct device *device_find_child(struct device *dev, const void *data,
device_match_t match);
typedef int (*device_match_t)(struct device *dev, const void *data);
with the following reasons:
- Protect caller's match data @*data which is for comparison and lookup
and the API does not actually need to modify @*data.
- Make the API's parameters (@match)() and @data have the same type as
all of other device finding APIs (bus|class|driver)_find_device().
- All kinds of existing device match functions can be directly taken
as the API's argument, they were exported by driver core.
Constify the API and adapt for various existing usages.
BTW, various subsystem changes are squashed into this commit to meet
'git bisect' requirement, and this commit has the minimal and simplest
changes to complement squashing shortcoming, and that may bring extra
code improvement.
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org> # for drivers/pwm
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-4-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-24 21:05:03 +08:00
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
driver core: Constify API device_find_child() and adapt for various usages
Constify the following API:
struct device *device_find_child(struct device *dev, void *data,
int (*match)(struct device *dev, void *data));
To :
struct device *device_find_child(struct device *dev, const void *data,
device_match_t match);
typedef int (*device_match_t)(struct device *dev, const void *data);
with the following reasons:
- Protect caller's match data @*data which is for comparison and lookup
and the API does not actually need to modify @*data.
- Make the API's parameters (@match)() and @data have the same type as
all of other device finding APIs (bus|class|driver)_find_device().
- All kinds of existing device match functions can be directly taken
as the API's argument, they were exported by driver core.
Constify the API and adapt for various existing usages.
BTW, various subsystem changes are squashed into this commit to meet
'git bisect' requirement, and this commit has the minimal and simplest
changes to complement squashing shortcoming, and that may bring extra
code improvement.
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org> # for drivers/pwm
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-4-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-24 21:05:03 +08:00
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
driver core: Constify API device_find_child() and adapt for various usages
Constify the following API:
struct device *device_find_child(struct device *dev, void *data,
int (*match)(struct device *dev, void *data));
To :
struct device *device_find_child(struct device *dev, const void *data,
device_match_t match);
typedef int (*device_match_t)(struct device *dev, const void *data);
with the following reasons:
- Protect caller's match data @*data which is for comparison and lookup
and the API does not actually need to modify @*data.
- Make the API's parameters (@match)() and @data have the same type as
all of other device finding APIs (bus|class|driver)_find_device().
- All kinds of existing device match functions can be directly taken
as the API's argument, they were exported by driver core.
Constify the API and adapt for various existing usages.
BTW, various subsystem changes are squashed into this commit to meet
'git bisect' requirement, and this commit has the minimal and simplest
changes to complement squashing shortcoming, and that may bring extra
code improvement.
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org> # for drivers/pwm
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-4-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-24 21:05:03 +08:00
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-19 15:58:56 +08:00
|
|
|
|
|
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
2025-07-19 15:58:56 +08:00
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 15:13:49 -08:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2007-07-17 21:46:00 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2023-03-15 14:20:32 +08:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
2009-01-06 13:20:38 -08:00
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2021-06-09 20:23:27 +08:00
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2007-07-18 15:15:45 -07:00
|
|
|
|
2014-09-19 09:42:14 -04:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-01 14:09:26 -05:00
|
|
|
|
2018-10-08 08:46:51 -07:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-21 09:20:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-12 13:47:50 -07:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-05-05 22:14:49 +02:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:25:42 -05:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2025-04-05 10:17:26 +02:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
2014-12-11 12:25:42 -05:00
|
|
|
|
2022-06-19 08:05:52 +02:00
|
|
|
|
2021-06-02 09:53:28 +03:00
|
|
|
|
2014-12-11 12:25:42 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2025-01-31 13:03:47 +01:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-31 13:03:47 +01:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-03 12:47:17 +11:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 08:54:23 -06:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-05 10:51:39 +02:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-01 01:48:52 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-18 14:35:23 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-26 19:06:30 +00:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-05 10:51:41 +02:00
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-07-17 21:46:00 -07:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
|
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 12:26:17 -05:00
|
|
|
|
2007-07-16 04:03:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|