Re: [Patch] Janitorial cleanup of GET_INDEX macro in arch/i386/pci/fixup.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 27 Jun 2005, Neil Horman wrote:
>
> Patch to clean up the implementation of the GET_INDEX macro in the i386 pci
> fixup code so that it uses the PCI_DEVFN macro, rather than re-implements it.

This looks wrong:

> -#define GET_INDEX(a, b) ((((a) - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) + ((b) & 7))
> +#define GET_INDEX(a, b) PCI_DEVFN((a - PCI_DEVICE_ID_INTEL_MCH_PA),b)

that first argument looks like it has parentheses at the wrong place, it 
should be

	(a) - PCI_DEVICE_ID_INTEL_MCH_PA

rather than

	(a - PCI_DEVICE_ID_INTEL_MCH_PA)

methinks.

Other than that... Greg?

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux