[PATCH 1/3] MSI driver for Freescale 83xx/85xx/86xx cpu

Segher Boessenkool segher at kernel.crashing.org
Tue Apr 22 23:22:16 EST 2008


>>>> +static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
>>>> +				  struct msi_msg *msg)

> No I mean I'm confused about the maths here. If we pull out the
> variables it boils down to:
>
> data = ((hwirq / 32) << 5) | ((hwirq % 32) & 0x1F)
>
> Which doesn't seem to actually do anything?

It's not a no-op, because hwirq is signed.  It probably should be
unsigned, like most things.


Segher




More information about the Linuxppc-dev mailing list