On Tue, 2005-09-20 at 12:56 -0700, Mark Haverkamp wrote: > + shost_for_each_device(device, dev->scsi_host_ptr) > + { > + if ((device->channel == CONTAINER_TO_CHANNEL > (container)) > + && (device->id == CONTAINER_TO_ID(container)) > + && (device->lun == CONTAINER_TO_LUN(container))) { > + switch (device_config_needed) { > + case DELETE: > + scsi_remove_device(device); > + break; > + case CHANGE: > + if (!dev->fsa_dev[container].valid) { > + scsi_remove_device(device); > + break; > + } > + scsi_rescan_device(&device- > >sdev_gendev); > + > + default: > + break; > + } > + scsi_device_put(device); > + break; > + } > + } This is open coding scsi_lookup_device(); why not simply use that API? It returns a device that also has to have scsi_device_put() called on it when you're finished. I suppose it won't necessarily matter for aacraid, but if we have to make the lookup more efficient for large lun configurations, you'll benefit. James - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html