Do not stop uclass iteration on error
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest20 patches 21 repliesIn review
- v515 patches 17 repliesSuperseded
- v421 patches 15 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 1 patch | 12 replies | Superseded | |
| v2 | 1 patch | 2 replies | Superseded | |
| v1 | 1 patch | 3 replies | Superseded |
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | dm: core: Fix uclass_probe_all to really probe all devicesdrivers/ test/ | +20 | 2 replies | |
| 2/20 | dm: treewide: Do not opencode uclass_probe_all()drivers/ drivers/ test/ +1 more | +9 | 1 reply | |
| 3/20 | dm: pci: Fix device PCI iterationdrivers/ | +2 | 1 reply | |
| 4/20 | bootstd: Fix listing boot devicesboot/ | +2 | 1 reply | |
| 5/20 | usb: ether: Fix error handling in usb_ether_initdrivers/ | +5 | 1 reply | |
| 6/20 | stdio: Fix class iteration in stdio_add_devices()common/ | +13 | 1 reply | |
| 7/20 | video: ipuv3: Fix error handling when getting the displaydrivers/ | +4 | 1 reply | |
| 8/20 | w1: Fix bus counting in w1_get_busdrivers/ | +11 | 1 reply | |
| 9/20 | cmd: List all uclass devices regardless of probe errorcmd/ cmd/ cmd/ +2 more | +43 | 1 reply | |
| 10/20 | dm: treewide: Use uclass_first_device_err when accessing one devicearch/ arch/ arch/ +22 more | +43 | 1 reply | |
| 11/20 | dm: treewide: Use uclass_next_device_err when accessing second devicearch/ board/ | +2 | 1 reply | |
| 12/20 | dm: blk: Do not use uclass_next_device_errdrivers/ | +6 | 1 reply | |
| 13/20 | net: eth-uclass: Do not set device on errornet/ | +2 | 1 reply | |
| 14/20 | dm: pci: Update error handling in pci_sriov_initdrivers/ | +3 | 1 reply | |
| 15/20 | mpc83xx: gazerbeam: Update sysinfo_get error handlingboard/ | +9 | 2 replies | |
| 16/20 | dm: core: Switch uclass_foreach_dev_probe to use simple iteratorinclude/ | +2 | 2 replies | |
| 17/20 | dm: core: Switch uclass_*_device_err to use uclass_*_device_checkdrivers/ include/ | +25 | 1 reply | |
| 18/20 | dm: core: Non-activated device may be returned from uclass iterators that provide error handlinginclude/ | +8 | 1 reply | |
| 19/20 | dm: treewide: Do not use the return value of simple uclass iteratorcmd/ drivers/ drivers/ +2 more | +17 | 0 replies | |
| 20/20 | dm: core: Do not stop uclass iteration on errordrivers/ include/ test/ +1 more | +48 | 0 replies |
Reviews trailers per patch
All 20 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass |
|---|---|
| 1/20 | R-b R-b |
| 2/20 | R-b R-b |
| 3/20 | R-b R-b |
| 4/20 | R-b R-b |
| 5/20 | R-b R-b |
| 6/20 | R-b R-b |
| 7/20 | R-b R-b |
| 8/20 | R-b R-b |
| 9/20 | R-b R-b |
| 10/20 | R-b R-b |
| 11/20 | R-b R-b |
| 12/20 | R-b R-b |
| 13/20 | R-b R-b |
| 14/20 | R-b |
| 15/20 | R-b R-b |
| 16/20 | R-b R-b |
| 17/20 | R-b R-b |
| 18/20 | R-b |
| 19/20 | R-b |
| 20/20 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 00/20] Do not stop uclass iteration on error
Hello,
this patch series fixes the simple uclass iterators to be usable for iterating uclasses even if some devices fail to probe.
Before this series when a probe error happens an error is returned without any device pointer, and iteration cannot continue to devices that happen to be after the failing device in the uclass list.
This is rarely expected, nor clearly documented, and for the most part not useful in any way.
All but the last patch are new in v4 removing problematic iterator use.
v5:
Split off patches that can be applied independently
Fix uclass_foreach_dev_probe, pci_sriov_init, and sysinfo_get to work after the uclass_first_device_err change.
Document that uclass_first_device_err and uclass_first_device_check can return non-activated device on error.
Consolidate multiple similar cleanups into one patch.
v6:
Split off the fixups from uclass_*_device_err switch patch.
Thanks
Michal
Michal Suchanek (20):
dm: core: Fix uclass_probe_all to really probe all devices
dm: treewide: Do not opencode uclass_probe_all()
dm: pci: Fix device PCI iteration
bootstd: Fix listing boot devices
usb: ether: Fix error handling in usb_ether_init
stdio: Fix class iteration in stdio_add_devices()
video: ipuv3: Fix error handling when getting the display
w1: Fix bus counting in w1_get_bus
cmd: List all uclass devices regardless of probe error
dm: treewide: Use uclass_first_device_err when accessing one device
dm: treewide: Use uclass_next_device_err when accessing second device
dm: blk: Do not use uclass_next_device_err
net: eth-uclass: Do not set device on error
dm: pci: Update error handling in pci_sriov_init
mpc83xx: gazerbeam: Update sysinfo_get error handling
dm: core: Switch uclass_foreach_dev_probe to use simple iterator
dm: core: Switch uclass_*_device_err to use uclass_*_device_check
dm: core: Non-activated device may be returned from uclass iterators
that provide error handling
dm: treewide: Do not use the return value of simple uclass iterator
dm: core: Do not stop uclass iteration on error
arch/arm/mach-k3/j721s2_init.c | 2 +- arch/arm/mach-omap2/am33xx/board.c | 4 +- arch/x86/cpu/broadwell/cpu.c | 4 +- arch/x86/cpu/intel_common/cpu.c | 4 +- arch/x86/lib/pinctrl_ich6.c | 4 +- board/atmel/common/mac_eeprom.c | 2 +- board/gdsys/mpc8308/gazerbeam.c | 12 +++-- board/intel/cougarcanyon2/cougarcanyon2.c | 4 +- boot/bootdev-uclass.c | 4 +- cmd/adc.c | 20 ++++---- cmd/demo.c | 15 +++--- cmd/gpio.c | 15 ++++-- cmd/pmic.c | 15 +++--- cmd/regulator.c | 13 +++--- cmd/virtio.c | 9 ++-- common/stdio.c | 32 ++++++------- drivers/block/blk-uclass.c | 16 +++---- drivers/core/uclass.c | 56 ++++++++++++----------- drivers/cpu/cpu-uclass.c | 20 ++------ drivers/dma/dma-uclass.c | 7 ++- drivers/gpio/gpio-uclass.c | 14 +++--- drivers/mmc/omap_hsmmc.c | 2 +- drivers/pci/pci-uclass.c | 26 ++++------- drivers/serial/serial-uclass.c | 2 +- drivers/serial/serial_bcm283x_mu.c | 2 +- drivers/serial/serial_bcm283x_pl011.c | 2 +- drivers/sysreset/sysreset_ast.c | 2 +- drivers/usb/gadget/ether.c | 11 ++--- drivers/video/exynos/exynos_fb.c | 14 ++---- drivers/video/imx/mxc_ipuv3_fb.c | 9 ++-- drivers/video/mali_dp.c | 2 +- drivers/video/stm32/stm32_dsi.c | 2 +- drivers/video/tegra124/dp.c | 4 +- drivers/virtio/virtio-uclass.c | 15 +----- drivers/w1/w1-uclass.c | 29 ++++++------ include/dm/uclass.h | 49 ++++++++++---------- lib/acpi/acpi_table.c | 2 +- lib/efi_loader/efi_gop.c | 2 +- net/eth-uclass.c | 6 ++- test/boot/bootmeth.c | 2 +- test/dm/acpi.c | 14 +++--- test/dm/core.c | 27 +++-------- test/dm/devres.c | 4 +- test/dm/i2c.c | 8 ++-- test/dm/test-fdt.c | 46 ++++++++++++++----- test/dm/virtio_device.c | 8 ++-- test/dm/virtio_rng.c | 2 +- test/fuzz/cmd_fuzz.c | 2 +- test/fuzz/virtio.c | 2 +- test/test-main.c | 11 +---- 50 files changed, 266 insertions(+), 313 deletions(-)
Signature · 1 line
2.37.3