Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0ed74e9 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branches 'pci/enumeration', 'pci/virtualization' and 'pci/cleanup' into next

* pci/enumeration:
  PCI: Generate uppercase hex for modalias interface class

* pci/virtualization:
  PCI: Add ACS quirk for Solarflare SFC9120 & SFC9140
  PCI: Remove unused pci_get_dma_source()
  PCI: Remove unused pci_find_upstream_pcie_bridge()

* pci/cleanup:
  PCI: Remove assignment from complicated "if" conditions
  PCI: Remove assignment from "if" conditions
  PCI: Remove unnecessary curly braces
  PCI: Add space before open parenthesis
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -182,7 +182,8 @@ int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle)
{
	acpi_handle bridge_handle, parent_handle;

	if (!(bridge_handle = acpi_pci_get_bridge_handle(pbus)))
	bridge_handle = acpi_pci_get_bridge_handle(pbus);
	if (!bridge_handle)
		return 0;
	if ((ACPI_FAILURE(acpi_get_parent(handle, &parent_handle))))
		return 0;
+8 −5
Original line number Diff line number Diff line
@@ -125,7 +125,8 @@ disable_slot(struct hotplug_slot *hotplug_slot)

	/* Unconfigure device */
	dbg("%s - unconfiguring slot %s", __func__, slot_name(slot));
	if ((retval = cpci_unconfigure_slot(slot))) {
	retval = cpci_unconfigure_slot(slot);
	if (retval) {
		err("%s - could not unconfigure slot %s",
		    __func__, slot_name(slot));
		goto disable_error;
@@ -141,9 +142,11 @@ disable_slot(struct hotplug_slot *hotplug_slot)
	}
	cpci_led_on(slot);

	if (controller->ops->set_power)
		if ((retval = controller->ops->set_power(slot, 0)))
	if (controller->ops->set_power) {
		retval = controller->ops->set_power(slot, 0);
		if (retval)
			goto disable_error;
	}

	if (update_adapter_status(slot->hotplug_slot, 0))
		warn("failure to update adapter file");
@@ -467,9 +470,9 @@ check_slots(void)
			    __func__, slot_name(slot), hs_csr);

			if (!slot->extracting) {
				if (update_latch_status(slot->hotplug_slot, 0)) {
				if (update_latch_status(slot->hotplug_slot, 0))
					warn("failure to update latch file");
				}

				slot->extracting = 1;
				atomic_inc(&extracting);
			}
+22 −22
Original line number Diff line number Diff line
@@ -182,9 +182,9 @@ static int zt5550_hc_enable_irq(void)
{
	u8 reg;

	if(hc_dev == NULL) {
	if (hc_dev == NULL)
		return -ENODEV;
	}

	reg = readb(csr_int_mask);
	reg = reg & ~ENUM_INT_MASK;
	writeb(reg, csr_int_mask);
@@ -195,9 +195,8 @@ static int zt5550_hc_disable_irq(void)
{
	u8 reg;

	if(hc_dev == NULL) {
	if (hc_dev == NULL)
		return -ENODEV;
	}

	reg = readb(csr_int_mask);
	reg = reg | ENUM_INT_MASK;
@@ -210,9 +209,9 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
	int status;

	status = zt5550_hc_config(pdev);
	if(status != 0) {
	if (status != 0)
		return status;
	}

	dbg("returned from zt5550_hc_config");

	memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
@@ -238,8 +237,9 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
	dbg("registered controller");

	/* Look for first device matching cPCI bus's bridge vendor and device IDs */
	if(!(bus0_dev = pci_get_device(PCI_VENDOR_ID_DEC,
					 PCI_DEVICE_ID_DEC_21154, NULL))) {
	bus0_dev = pci_get_device(PCI_VENDOR_ID_DEC,
				  PCI_DEVICE_ID_DEC_21154, NULL);
	if (!bus0_dev) {
		status = -ENODEV;
		goto init_register_error;
	}
+1 −2
Original line number Diff line number Diff line
@@ -1096,9 +1096,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

	/* initialize our threads if they haven't already been started up */
	rc = one_time_init();
	if (rc) {
	if (rc)
		goto err_free_bus;
	}

	dbg("pdev = %p\n", pdev);
	dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0));
+7 −12
Original line number Diff line number Diff line
@@ -705,9 +705,8 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
		if (temp == max) {
			*head = max->next;
		} else {
			while (temp && temp->next != max) {
			while (temp && temp->next != max)
				temp = temp->next;
			}

			if (temp)
				temp->next = max->next;
@@ -903,9 +902,8 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
	/*
	 * Check to see if it was our interrupt
	 */
	if (!(misc & 0x000C)) {
	if (!(misc & 0x000C))
		return IRQ_NONE;
	}

	if (misc & 0x0004) {
		/*
@@ -2006,9 +2004,8 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
	/* Check to see if the interlock is closed */
	tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR);

	if (tempdword & (0x01 << hp_slot)) {
	if (tempdword & (0x01 << hp_slot))
		return 1;
	}

	if (func->is_a_board) {
		rc = board_replaced(func, ctrl);
@@ -2070,9 +2067,8 @@ int cpqhp_process_SI(struct controller *ctrl, struct pci_func *func)
		}
	}

	if (rc) {
	if (rc)
		dbg("%s: rc = %d\n", __func__, rc);
	}

	if (p_slot)
		update_slot_info(ctrl, p_slot);
@@ -2095,9 +2091,8 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func)
	device = func->device;
	func = cpqhp_slot_find(ctrl->bus, device, index++);
	p_slot = cpqhp_find_slot(ctrl, device);
	if (p_slot) {
	if (p_slot)
		physical_slot = p_slot->number;
	}

	/* Make sure there are no video controllers here */
	while (func && !rc) {
Loading