acpi_walk_dep_device_list(9)
π NAME π
okay so bestie, this is acpi_walk_dep_device_list(9) from the Kernel API Manual β and it literally applies a callback to every entry in acpi_dep_list. slay.
β¨ SYNOPSIS β¨
int acpi_walk_dep_device_list (acpi_handle handle , int (*callback)(struct acpi_dep_data *, void *) , void *data );
π ARGUMENTS π
handleβ the ACPI handle of the supplier device. iykyk, it's giving βwhich supplier are we talking about?βcallbackβ pointer to the callback function to apply. yes bestie, you bring the function and it gets applied.dataβ pointer to some data to pass to the callback. lowkey just the extra vibes you hand over.
π¦ DESCRIPTION π¦
okay so the return value of the callback is the main character here β it determines this function's behaviour. no cap.
- if the callback returns
0, we continue to iterate overacpi_dep_list. keep it moving, periodt. - if a positive value is returned, then the loop is broken but this function returns
0. so the loop stops early but the final answer is still0β the way that works is iconic. - if a negative value is returned by the callback, then the loop is broken and that value is returned as the final error. π that's the error, fr fr.
bestie, the callback's return value controls everything:0= keep iterating; positive = break the loop but return0; negative = break and return that negative value as the final error. π
π SEE ALSO π
Kernel file ./drivers/acpi/scan.c, plus the whole friend group:
acpi_scan_drop_device(9)acpi_fetch_acpi_dev(9)acpi_get_acpi_dev(9)acpi_dma_supported(9)acpi_get_dma_attr(9)acpi_dma_get_range(9)acpi_dma_configure_id(9)acpi_dev_clear_dependencies(9)acpi_dev_ready_for_enumeration(9)acpi_dev_get_next_consumer_dev(9)acpi_bus_scan(9)acpi_bus_trim(9)
π source: ./drivers/acpi Β· dated October 2026 β and that's the whole manual page, bestie. periodt. π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms