Skip to content

Commit

Permalink
Merge branch 'remotes/lorenzo/pci/dwc'
Browse files Browse the repository at this point in the history
  - Fix dwc find_next_bit() usage (Niklas Cassel)

* remotes/lorenzo/pci/dwc:
  PCI: dwc: Fix find_next_bit() usage
  • Loading branch information
bjorn-helgaas committed Nov 28, 2019
2 parents ba7e87c + 1137e61 commit d76d273
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/pci/controller/dwc/pcie-designware-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,23 @@ static struct msi_domain_info dw_pcie_msi_domain_info = {
irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
{
int i, pos, irq;
u32 val, num_ctrls;
unsigned long val;
u32 status, num_ctrls;
irqreturn_t ret = IRQ_NONE;

num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;

for (i = 0; i < num_ctrls; i++) {
dw_pcie_rd_own_conf(pp, PCIE_MSI_INTR0_STATUS +
(i * MSI_REG_CTRL_BLOCK_SIZE),
4, &val);
if (!val)
4, &status);
if (!status)
continue;

ret = IRQ_HANDLED;
val = status;
pos = 0;
while ((pos = find_next_bit((unsigned long *) &val,
MAX_MSI_IRQS_PER_CTRL,
while ((pos = find_next_bit(&val, MAX_MSI_IRQS_PER_CTRL,
pos)) != MAX_MSI_IRQS_PER_CTRL) {
irq = irq_find_mapping(pp->irq_domain,
(i * MAX_MSI_IRQS_PER_CTRL) +
Expand Down

0 comments on commit d76d273

Please sign in to comment.