This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/include/linux
Tejun Heo 1eca4365be libata: beef up iterators
There currently are the following looping constructs.

* __ata_port_for_each_link() for all available links
* ata_port_for_each_link() for edge links
* ata_link_for_each_dev() for all devices
* ata_link_for_each_dev_reverse() for all devices in reverse order

Now there's a need for looping construct which is similar to
__ata_port_for_each_link() but iterates over PMP links before the host
link.  Instead of adding another one with long name, do the following
cleanup.

* Implement and export ata_link_next() and ata_dev_next() which take
  @mode parameter and can be used to build custom loop.
* Implement ata_for_each_link() and ata_for_each_dev() which take
  looping mode explicitly.

The following iteration modes are implemented.

* ATA_LITER_EDGE		: loop over edge links
* ATA_LITER_HOST_FIRST		: loop over all links, host link first
* ATA_LITER_PMP_FIRST		: loop over all links, PMP links first

* ATA_DITER_ENABLED		: loop over enabled devices
* ATA_DITER_ENABLED_REVERSE	: loop over enabled devices in reverse order
* ATA_DITER_ALL			: loop over all devices
* ATA_DITER_ALL_REVERSE		: loop over all devices in reverse order

This change removes exlicit device enabledness checks from many loops
and makes it clear which ones are iterated over in which direction.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-28 22:43:20 -05:00
..
2008-12-03 22:12:38 -08:00
2008-12-03 22:12:38 -08:00
2008-12-25 11:40:09 +11:00
2008-12-05 14:49:18 -08:00
2008-11-26 12:13:34 +01:00
2008-11-30 11:00:15 -08:00
2008-12-25 11:01:43 +11:00
2008-12-15 23:44:31 -08:00
2008-12-25 11:40:09 +11:00
2008-12-08 01:14:16 -08:00
2007-03-16 00:59:29 -04:00
2008-12-28 22:43:20 -05:00
2008-12-19 15:22:54 -05:00
2008-12-21 14:21:14 +11:00
2008-11-30 10:03:35 -08:00
2007-10-16 09:43:02 -07:00
2008-11-28 16:24:56 -08:00
2008-12-04 09:09:37 +01:00
2008-12-20 09:15:46 +01:00
2008-12-08 13:54:05 +01:00
2007-07-16 09:05:50 -07:00
2008-12-15 23:42:33 -08:00
2008-12-15 16:28:57 -08:00
2008-10-16 11:21:31 -07:00