Skip to contentSkip to conversation

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

PATCH In review Paul Menage 2 participants 2 messages Feb 12, 2004

lore
Share & tools
lore
#0 lore raw

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

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

include/asm-x86_64/pci-direct.h renamed from include/asm-x86_64/pci-direct.h.old +1 -1
@@ -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);
#1 lore raw
Quoted 5 lines · On Thu, 12 Feb 2004 03:01:29 -0800 Paul Menage <[email protected]> wrote:

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.

Yup, typo apparently. Thanks, I applied the patch.

-Andi