* [PATCH] Typo in include/asm-x86_64/pci-direct.h ?
@ 2004-02-12 11:01 Paul Menage
2004-02-12 16:51 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Paul Menage @ 2004-02-12 11:01 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-12 11:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-12 11:01 [PATCH] Typo in include/asm-x86_64/pci-direct.h ? Paul Menage
2004-02-12 16:51 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox