diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2010-09-15 04:13:19 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-10-13 01:19:20 -0400 |
commit | dda804ad4023cc202466c46fcfcc163131953838 (patch) | |
tree | 6b048667ed55f3e6164076c1d9caa4636dd4b865 | |
parent | 8032214346c0c892e859cf6eee6c8ba305cbfe78 (diff) |
powerpc/pci: Fix return type of BUID_{HI,LO} macros
BUID_HI and BUID_LO are used to pass data to call_rtas, which expects
ints or u32s. But the macro doesn't cast the return, so the result is
still u64. Use the upper_32_bits and lower_32_bits macros that have been
added to kernel.h.
Found by getting printf format errors trying to debug print the args, no
actual code change for 64 bit kernels where the macros are actually
used.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/include/asm/ppc-pci.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index 42fdff0e4b32..43268f15004e 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h | |||
@@ -28,8 +28,8 @@ extern void find_and_init_phbs(void); | |||
28 | extern struct pci_dev *isa_bridge_pcidev; /* may be NULL if no ISA bus */ | 28 | extern struct pci_dev *isa_bridge_pcidev; /* may be NULL if no ISA bus */ |
29 | 29 | ||
30 | /** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ | 30 | /** Bus Unit ID macros; get low and hi 32-bits of the 64-bit BUID */ |
31 | #define BUID_HI(buid) ((buid) >> 32) | 31 | #define BUID_HI(buid) upper_32_bits(buid) |
32 | #define BUID_LO(buid) ((buid) & 0xffffffff) | 32 | #define BUID_LO(buid) lower_32_bits(buid) |
33 | 33 | ||
34 | /* PCI device_node operations */ | 34 | /* PCI device_node operations */ |
35 | struct device_node; | 35 | struct device_node; |