bus = slot->bridge->subordinate; if (!bus) goto exit_rc; slot->pci_devs = &bus->devices;  dbg("%s set slot->name to %s\n",  __FUNCTION__, pci_name(slot->bridge)); strcpy(slot->name, pci_name(slot->bridge)); } 
slot->bus = bus; slot->pci_devs = &bus->devices; set_slot_name(slot); 
static int setup_pci_slot(struct slot *slot){	struct pci_bus *bus;	int rc;	if (slot->type == PHB) {		rc = set_phb_slot_name(slot);		if (rc < 0) {			err("%s: failed to set phb slot name\n", __FUNCTION__);			goto exit_rc;		}	} else {		slot->bridge = rpaphp_find_bridge_pdev(slot);		if (!slot->bridge) {			/* slot being added doesn't have pci_dev yet */			err("%s: no pci_dev for bridge dn %s\n",					__FUNCTION__, slot->name);			goto exit_rc;		}		bus = slot->bridge->subordinate;		if (!bus)			goto exit_rc;		slot->pci_devs = &bus->devices;		dbg("%s set slot->name to %s\n",  __FUNCTION__,				pci_name(slot->bridge));		strcpy(slot->name, pci_name(slot->bridge));	}	/* find slot's pci_dev if it's not empty */	if (slot->hotplug_slot->info->adapter_status == EMPTY) {		slot->state = EMPTY;	/* slot is empty */	} else {		/* slot is occupied */		if (!(slot->dn->child)) {			/* non-empty slot has to have child */			err("%s: slot[%s]'s device_node doesn't have child for adapter\n", 				__FUNCTION__, slot->name);			goto exit_rc;		}		if (slot->hotplug_slot->info->adapter_status == NOT_CONFIGURED) {			dbg("%s CONFIGURING pci adapter in slot[%s]\n",  				__FUNCTION__, slot->name);			if (rpaphp_config_pci_adapter(slot)) {				err("%s: CONFIG pci adapter failed\n", __FUNCTION__);				goto exit_rc;					}		} else if (slot->hotplug_slot->info->adapter_status != CONFIGURED) {			err("%s: slot[%s]'s adapter_status is NOT_VALID.\n",				__FUNCTION__, slot->name);			goto exit_rc;		}		print_slot_pci_funcs(slot);		if (!list_empty(slot->pci_devs)) {			slot->state = CONFIGURED;		} else {			/* DLPAR add as opposed to 		 	 * boot time */			slot->state = NOT_CONFIGURED;		}	}	return 0;exit_rc:	dealloc_slot_struct(slot);	return -EINVAL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9c209c919df95f83aa042b3352c43841ad15a02b/rpaphp_pci.c/buggy/drivers/pci/hotplug/rpaphp_pci.c