diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2025-01-05 16:34:07 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-10 15:26:12 +0100 |
commit | 523c6b3ed7702a638e0f8fd02708a7ed4f938269 (patch) | |
tree | 23b25d18601bab6018b00e9f9f5bc30242de8d2b /scripts/lib/kdoc/kdoc_parser.py | |
parent | 037116a6cca3e4dbc97905b6e254e8fe7475d502 (diff) |
driver core: Correct API device_for_each_child_reverse_from() prototype
For API device_for_each_child_reverse_from(..., const void *data,
int (*fn)(struct device *dev, const void *data))
- Type of @data is const pointer, and means caller's data @*data is not
allowed to be modified, but that usually is not proper for such non
finding device iterating API.
- Types for both @data and @fn are not consistent with all other
for_each device iterating APIs device_for_each_child(_reverse)(),
bus_for_each_dev() and (driver|class)_for_each_device().
Correct its prototype by removing const from parameter types, then adapt
for various existing usages.
An dedicated typedef device_iter_t will be introduced as @fn() type for
various for_each device interating APIs later.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250105-class_fix-v6-6-3a2f1768d4d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions