From a173a6255b5c3b7febea5cdf581fc3a57299954a Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Tue, 17 Jun 2014 17:05:36 +1000 Subject: Remove guarding #includes by CONFIG_FOO combinations First of many to remove guarding the inclusion of headers based on CONFIG_ options. This *potentially* could hide issues such as functions being swapped from under our feet, since different runtime behaviour could be declared with the function same name and type-signature. Hence, depending on the header we happen to get may change runtime behaviour. Change-Id: Ife56801c783c44e1882abef711e09b85b7f295a4 Signed-off-by: Edward O'Callaghan Reviewed-on: http://review.coreboot.org/6055 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/device/oprom/yabel/interrupt.c | 2 -- src/device/oprom/yabel/io.c | 9 +-------- src/device/oprom/yabel/mem.c | 5 +---- 3 files changed, 2 insertions(+), 14 deletions(-) (limited to 'src/device/oprom') diff --git a/src/device/oprom/yabel/interrupt.c b/src/device/oprom/yabel/interrupt.c index cf430be6cd..92b058b644 100644 --- a/src/device/oprom/yabel/interrupt.c +++ b/src/device/oprom/yabel/interrupt.c @@ -24,10 +24,8 @@ #include #include "../x86emu/prim_ops.h" -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL #include #include -#endif //setup to run the code at the address, that the Interrupt Vector points to... diff --git a/src/device/oprom/yabel/io.c b/src/device/oprom/yabel/io.c index 94f610debd..37beccbe4e 100644 --- a/src/device/oprom/yabel/io.c +++ b/src/device/oprom/yabel/io.c @@ -20,15 +20,12 @@ #include #include "io.h" -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL #include #include #include -#endif -#if CONFIG_ARCH_X86 #include -#else + // these are not used, only needed for linking, must be overridden using X86emu_setupPioFuncs // with the functions and struct below void @@ -76,10 +73,6 @@ inl(u16 port) return 0; } -#ifndef CONFIG_PCI -#endif -#endif - #if CONFIG_YABEL_DIRECTHW u8 my_inb(X86EMU_pioAddr addr) { diff --git a/src/device/oprom/yabel/mem.c b/src/device/oprom/yabel/mem.c index a7d0289d71..620548dc10 100644 --- a/src/device/oprom/yabel/mem.c +++ b/src/device/oprom/yabel/mem.c @@ -18,13 +18,10 @@ #include "biosemu.h" #include "mem.h" #include "compat/time.h" +#include #if !CONFIG_YABEL_DIRECTHW || !CONFIG_YABEL_DIRECTHW -#if CONFIG_PCI_OPTION_ROM_RUN_YABEL -#include -#endif - // define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...) #if CONFIG_X86EMU_DEBUG static u8 in_check = 0; // to avoid recursion... -- cgit v1.2.3