From ca7f93d5674535da84d5fb216328d95b58ecc3aa Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sat, 9 Nov 2019 16:50:47 +0100 Subject: [PATCH] fsp{rangeley,baytrail,broadwell_de}: Fix dead assignment Change-Id: I0f02a4508b78cdb0706df6f288138a9db54e229e Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/36703 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/northbridge/intel/fsp_rangeley/northbridge.c | 6 ++---- src/soc/intel/fsp_baytrail/northcluster.c | 6 ++---- src/soc/intel/fsp_broadwell_de/northcluster.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/northbridge/intel/fsp_rangeley/northbridge.c b/src/northbridge/intel/fsp_rangeley/northbridge.c index 63f2068725..4ebbe7ec15 100644 --- a/src/northbridge/intel/fsp_rangeley/northbridge.c +++ b/src/northbridge/intel/fsp_rangeley/northbridge.c @@ -76,7 +76,7 @@ static int get_pcie_bar(u32 *base) } -static int add_fixed_resources(struct device *dev, int index) +static void add_fixed_resources(struct device *dev, int index) { struct resource *resource; @@ -87,8 +87,6 @@ static int add_fixed_resources(struct device *dev, int index) IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; mmio_resource(dev, index++, legacy_hole_base_k, legacy_hole_size_k); - - return index; } static void mc_add_dram_resources(struct device *dev) @@ -133,7 +131,7 @@ static void mc_add_dram_resources(struct device *dev) printk(BIOS_INFO, "Available memory above 4GB: %lluM\n", (bmbound_hi - 0x100000000) >> 20); } - index = add_fixed_resources(dev, index); + add_fixed_resources(dev, index); } static void mc_read_resources(struct device *dev) diff --git a/src/soc/intel/fsp_baytrail/northcluster.c b/src/soc/intel/fsp_baytrail/northcluster.c index 797039a27e..474ba84890 100644 --- a/src/soc/intel/fsp_baytrail/northcluster.c +++ b/src/soc/intel/fsp_baytrail/northcluster.c @@ -102,7 +102,7 @@ static int get_pcie_bar(u32 *base) } -static int add_fixed_resources(struct device *dev, int index) +static void add_fixed_resources(struct device *dev, int index) { struct resource *resource; @@ -113,8 +113,6 @@ static int add_fixed_resources(struct device *dev, int index) IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; mmio_resource(dev, index++, legacy_hole_base_k, legacy_hole_size_k); - - return index; } static void mc_add_dram_resources(struct device *dev) @@ -157,7 +155,7 @@ static void mc_add_dram_resources(struct device *dev) printk(BIOS_INFO, "Available memory above 4GB: %lluM\n", highmem_size >> 20); - index = add_fixed_resources(dev, index); + add_fixed_resources(dev, index); } static void nc_read_resources(struct device *dev) diff --git a/src/soc/intel/fsp_broadwell_de/northcluster.c b/src/soc/intel/fsp_broadwell_de/northcluster.c index 2e27d37b16..a630c1bba4 100644 --- a/src/soc/intel/fsp_broadwell_de/northcluster.c +++ b/src/soc/intel/fsp_broadwell_de/northcluster.c @@ -30,7 +30,7 @@ static const int legacy_hole_base_k = 0xa0000 / 1024; static const int legacy_hole_size_k = 384; -static int add_fixed_resources(struct device *dev, int index) +static void add_fixed_resources(struct device *dev, int index) { struct resource *resource; u32 pcie_config_base, pcie_config_size; @@ -52,8 +52,6 @@ static int add_fixed_resources(struct device *dev, int index) IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; mmio_resource(dev, index++, legacy_hole_base_k, legacy_hole_size_k); - - return index; } static void mc_add_dram_resources(struct device *dev) @@ -117,7 +115,7 @@ static void mc_add_dram_resources(struct device *dev) printk(BIOS_INFO, "Available memory above 4GB: %lluM\n", highmem_size >> 20); - index = add_fixed_resources(dev, index); + add_fixed_resources(dev, index); } static void nc_read_resources(struct device *dev)