acpi_walk_dep_device_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 over acpi_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 still 0 β€” 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 return 0; negative = break and return that negative value as the final error. πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./drivers/acpi/scan.c, plus the whole friend group:


πŸ’– source: ./drivers/acpi Β· dated October 2026 β€” and that's the whole manual page, bestie. periodt. 🫢

πŸ“¦ where this page comes from