[PATCH] Typo in include/asm-x86_64/pci-direct.h ?

From: Paul Menage
Date: Thu Feb 12 2004 - 06:02:39 EST


Hi Andi,

I noticed that the return value of read_pci_config_16() was a u8, which looks a bit suspicious. The only users of it are in kernel/aperture.c, and appear to work despite only getting 8 bits back, due to lucky circumstances. Patch applies to both 2.4 and 2.6.

Paul

--- linux/include/asm-x86_64/pci-direct.h.old 2004-02-12 02:37:53 -0800
+++ linux/include/asm-x86_64/pci-direct.h 2004-02-12 02:37:15 -0800
@@ -28,7 +28,7 @@
return v;
}

-static inline u8 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset)
+static inline u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset)
{
u16 v;
outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8);


-
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/