On Tue, Oct 02, 2007 at 11:04:41AM -0400, Jeff Garzik wrote: > 1) Check dev->sdev for NULL Ok. > 2) remove the unnecessary ata_device loop. If you know the ata_device > pointer, you should not throw it away and then do a search to find it again. > > You need two functions, ata_acpi_ap_notify() and ata_acpi_dev_notify(). > Pass 'ap' to the former, and 'dev' to the latter. > > Both functions should marshal their arguments, then call a common > function (presumably what 95% of current ata_acpi_notify does). Sure. > 3) Won't this result in a single hotplug event calling > ata_ehi_hotplugged() multiple times -- once for the port, and once for > each device attached to the port? No - the platform will either send an event for the port or for an individual device. It'll never simultaneously send one for both the port and a device. Semantically the one from the port is a "check all children" request and the one from the device a "check this individual device", but I believe these are both equivalent in the current hotswap implementation. -- Matthew Garrett | mjg59@xxxxxxxxxxxxx - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html