From bf0970e762a6611cef06af761bc2dec068d439bb Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Thu, 21 Mar 2019 11:10:03 +0100 Subject: src: Use include when appropriate Change-Id: I23bc0191ca8fcd88364e5c08be7c90195019e399 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/32012 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh Reviewed-by: David Guckian --- src/drivers/aspeed/ast2050/ast2050.c | 4 +--- src/drivers/aspeed/common/ast_dp501.c | 2 ++ src/drivers/aspeed/common/ast_main.c | 4 +++- src/drivers/aspeed/common/ast_post.c | 3 ++- src/drivers/emulation/qemu/bochs.c | 2 -- src/drivers/emulation/qemu/cirrus.c | 3 --- src/drivers/intel/gma/intel_ddi.c | 3 +-- src/drivers/intel/gma/vbt.c | 1 - src/drivers/net/ne2k.c | 1 - src/drivers/siemens/nc_fpga/nc_fpga.c | 2 +- src/drivers/sil/3114/sil_sata.c | 1 - src/drivers/spi/spi_flash.c | 3 +-- src/drivers/xgi/common/vb_init.c | 4 +++- src/drivers/xgi/common/vb_setmode.c | 4 ++-- src/drivers/xgi/common/xgi_coreboot.c | 6 +----- src/drivers/xgi/common/xgi_coreboot.h | 2 -- src/drivers/xgi/z9s/z9s.c | 3 +-- 17 files changed, 18 insertions(+), 30 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c index 035d5c6ef9..631372d428 100644 --- a/src/drivers/aspeed/ast2050/ast2050.c +++ b/src/drivers/aspeed/ast2050/ast2050.c @@ -12,17 +12,15 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#include + #include #include #include - #include #include #include #include #include - #include #include "../common/aspeed_coreboot.h" diff --git a/src/drivers/aspeed/common/ast_dp501.c b/src/drivers/aspeed/common/ast_dp501.c index 46b76f51bf..2e8b897464 100644 --- a/src/drivers/aspeed/common/ast_dp501.c +++ b/src/drivers/aspeed/common/ast_dp501.c @@ -15,6 +15,8 @@ * GNU General Public License for more details. */ +#include + #include "ast_drv.h" static void send_ack(struct ast_private *ast) diff --git a/src/drivers/aspeed/common/ast_main.c b/src/drivers/aspeed/common/ast_main.c index 3a0cf209f2..086b0a4f10 100644 --- a/src/drivers/aspeed/common/ast_main.c +++ b/src/drivers/aspeed/common/ast_main.c @@ -26,8 +26,10 @@ /* * Authors: Dave Airlie */ -#include "ast_drv.h" +#include + +#include "ast_drv.h" #include "ast_dram_tables.h" void ast_set_index_reg_mask(struct ast_private *ast, diff --git a/src/drivers/aspeed/common/ast_post.c b/src/drivers/aspeed/common/ast_post.c index 0727443732..5f935b9976 100644 --- a/src/drivers/aspeed/common/ast_post.c +++ b/src/drivers/aspeed/common/ast_post.c @@ -29,8 +29,9 @@ #define COREBOOT_AST_FAILOVER_TIMEOUT 10000000 -#include "ast_drv.h" +#include +#include "ast_drv.h" #include "ast_dram_tables.h" static void ast_init_dram_2300(struct drm_device *dev); diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index 2310c9e463..22095efb02 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -12,11 +12,9 @@ */ #include -#include #include #include #include - #include #include #include diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index 04edef44aa..ed5a4f4767 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -15,17 +15,14 @@ */ #include -#include #include #include - #include #include #include #include #include #include - #include #include diff --git a/src/drivers/intel/gma/intel_ddi.c b/src/drivers/intel/gma/intel_ddi.c index 58134db2d3..471a5d2331 100644 --- a/src/drivers/intel/gma/intel_ddi.c +++ b/src/drivers/intel/gma/intel_ddi.c @@ -25,20 +25,19 @@ * Eugeni Dodonov * */ + #include #include #include #include #include #include -#include #include #include #include #include #include #include - #include #include #include diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c index 7455704530..fa50ae9921 100644 --- a/src/drivers/intel/gma/vbt.c +++ b/src/drivers/intel/gma/vbt.c @@ -16,7 +16,6 @@ */ #include -#include #include #include #include diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c index 6f8aca2446..e3dd948a83 100644 --- a/src/drivers/net/ne2k.c +++ b/src/drivers/net/ne2k.c @@ -29,7 +29,6 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 #include #include -#include #include #include #include diff --git a/src/drivers/siemens/nc_fpga/nc_fpga.c b/src/drivers/siemens/nc_fpga/nc_fpga.c index ef1f2f2136..fb681adb2d 100644 --- a/src/drivers/siemens/nc_fpga/nc_fpga.c +++ b/src/drivers/siemens/nc_fpga/nc_fpga.c @@ -19,9 +19,9 @@ #include #include #include -#include #include #include + #include "nc_fpga.h" static void *nc_fpga_bar0; diff --git a/src/drivers/sil/3114/sil_sata.c b/src/drivers/sil/3114/sil_sata.c index 4908413fb8..dd6481a204 100644 --- a/src/drivers/sil/3114/sil_sata.c +++ b/src/drivers/sil/3114/sil_sata.c @@ -14,7 +14,6 @@ * GNU General Public License for more details. */ -#include #include #include #include diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index 71dc660d2b..82398ddf06 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -11,14 +11,13 @@ #include #include #include -#include #include #include #include #include +#include #include "spi_flash_internal.h" -#include static void spi_flash_addr(u32 addr, u8 *cmd) { diff --git a/src/drivers/xgi/common/vb_init.c b/src/drivers/xgi/common/vb_init.c index 0d25e254e2..a20c0683d4 100644 --- a/src/drivers/xgi/common/vb_init.c +++ b/src/drivers/xgi/common/vb_init.c @@ -17,14 +17,16 @@ * GNU General Public License for more details. */ +#include + #include "xgi_coreboot.h" #include "vstruct.h" - #include "XGIfb.h" #include "vb_def.h" #include "vb_util.h" #include "vb_setmode.h" #include "vb_init.h" + static const unsigned short XGINew_DDRDRAM_TYPE340[4][2] = { { 16, 0x45}, { 8, 0x35}, diff --git a/src/drivers/xgi/common/vb_setmode.c b/src/drivers/xgi/common/vb_setmode.c index e80bc35cc4..162d00cfcf 100644 --- a/src/drivers/xgi/common/vb_setmode.c +++ b/src/drivers/xgi/common/vb_setmode.c @@ -14,11 +14,11 @@ * GNU General Public License for more details. */ +#include + #include "xgi_coreboot.h" #include "vstruct.h" - #include "XGIfb.h" - #include "vb_def.h" #include "vb_init.h" #include "vb_util.h" diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c index 745baa2d88..5aba472eb7 100644 --- a/src/drivers/xgi/common/xgi_coreboot.c +++ b/src/drivers/xgi/common/xgi_coreboot.c @@ -15,27 +15,23 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#include + #include #include - #include #include #include #include #include - #include #include "xgi_coreboot.h" #include "vstruct.h" - #include "XGIfb.h" #include "XGI_main.h" #include "vb_init.h" #include "vb_util.h" #include "vb_setmode.h" - #include "XGI_main.c" static int xgi_vbe_valid; diff --git a/src/drivers/xgi/common/xgi_coreboot.h b/src/drivers/xgi/common/xgi_coreboot.h index dc8f49eb54..41952d6925 100644 --- a/src/drivers/xgi/common/xgi_coreboot.h +++ b/src/drivers/xgi/common/xgi_coreboot.h @@ -19,12 +19,10 @@ #ifndef _XGI_COREBOOT_ #define _XGI_COREBOOT_ -#include #include #include #include #include - #include #include #include diff --git a/src/drivers/xgi/z9s/z9s.c b/src/drivers/xgi/z9s/z9s.c index 3b468114c9..1925514043 100644 --- a/src/drivers/xgi/z9s/z9s.c +++ b/src/drivers/xgi/z9s/z9s.c @@ -12,9 +12,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#include -#include +#include #include #include #include -- cgit v1.2.3