Re: [PATCH v1 1/1] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-12 Thread Andy Shevchenko
On Mon, Apr 12, 2021 at 8:27 PM Rafael J. Wysocki wrote: > > On Sat, Apr 10, 2021 at 3:29 PM Andy Shevchenko > wrote: > > > > The macro requires to call acpi_dev_put() on each iteration. > > Due to this it doesn't tolerate sudden disappearence of the devices. And should be "disappearance" :-) >

Re: [PATCH v1 1/1] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-12 Thread Rafael J. Wysocki
On Sat, Apr 10, 2021 at 3:29 PM Andy Shevchenko wrote: > > The macro requires to call acpi_dev_put() on each iteration. > Due to this it doesn't tolerate sudden disappearence of the devices. > > Document all these nuances to prevent users blindly call it without > understanding the possible issues

[PATCH v1 1/1] ACPI: utils: Document for_each_acpi_dev_match() macro

2021-04-10 Thread Andy Shevchenko
The macro requires to call acpi_dev_put() on each iteration. Due to this it doesn't tolerate sudden disappearence of the devices. Document all these nuances to prevent users blindly call it without understanding the possible issues. While at it, add the note to the acpi_dev_get_next_match_dev() a