Re: [PATCH 05/15] powerpc/powernv: Split out set MSI IRQ chip code

From: Michael Neuling
Date: Mon Sep 22 2014 - 00:31:57 EST


> >+static void set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq)
> >+{
> >+ struct irq_data *idata;
> >+ struct irq_chip *ichip;
> >+
> >+ /*
> >+ * Change the IRQ chip for the MSI interrupts on PHB3.
> >+ * The corresponding IRQ chip should be populated for
> >+ * the first time.
> >+ */
> >+ if (phb->type == PNV_PHB_IODA2) {
> >+ if (!phb->ioda.irq_chip_init) {
> >+ idata = irq_get_irq_data(virq);
> >+ ichip = irq_data_get_irq_chip(idata);
> >+ phb->ioda.irq_chip_init = 1;
> >+ phb->ioda.irq_chip = *ichip;
> >+ phb->ioda.irq_chip.irq_eoi = pnv_ioda2_msi_eoi;
> >+ }
> >+
> >+ irq_set_chip(virq, &phb->ioda.irq_chip);
> >+ }
> >+}
> >+
>
> Nitpick: to check PHB type and bail early could avoid nested code :)
>
> if (phb->type != PNV_PHB_IODA2)
> return;

OK, will do in repost.

Thanks,
Mikey

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/