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

Commit 314fc854 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Bjorn Helgaas
Browse files

PCI: dwc: designware: Fix style errors in pcie-designware.c



No functional change. Fix all checkpatch warnings and check errors in
pcie-designware.c

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-By: default avatarJoao Pinto <jpinto@synopsys.com>
parent 5f334db6
Loading
Loading
Loading
Loading
+21 −21
Original line number Diff line number Diff line
@@ -40,13 +40,13 @@ int dw_pcie_read(void __iomem *addr, int size, u32 *val)
		return PCIBIOS_BAD_REGISTER_NUMBER;
	}

	if (size == 4)
	if (size == 4) {
		*val = readl(addr);
	else if (size == 2)
	} else if (size == 2) {
		*val = readw(addr);
	else if (size == 1)
	} else if (size == 1) {
		*val = readb(addr);
	else {
	} else {
		*val = 0;
		return PCIBIOS_BAD_REGISTER_NUMBER;
	}
@@ -207,9 +207,8 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
			while ((pos = find_next_bit(&val, 32, pos)) != 32) {
				irq = irq_find_mapping(pp->irq_domain,
						       i * 32 + pos);
				dw_pcie_wr_own_conf(pp,
						PCIE_MSI_INTR0_STATUS + i * 12,
						4, 1 << pos);
				dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS +
						    i * 12, 4, 1 << pos);
				generic_handle_irq(irq);
				pos++;
			}
@@ -275,8 +274,9 @@ static void dw_pcie_msi_set_irq(struct pcie_port *pp, int irq)
static int assign_irq(int no_irqs, struct msi_desc *desc, int *pos)
{
	int irq, pos0, i;
	struct pcie_port *pp = (struct pcie_port *) msi_desc_to_pci_sysdata(desc);
	struct pcie_port *pp;

	pp  = (struct pcie_port *)msi_desc_to_pci_sysdata(desc);
	pos0 = bitmap_find_free_region(pp->msi_irq_in_use, MAX_MSI_IRQS,
				       order_base_2(no_irqs));
	if (pos0 < 0)