diff options
author | Richard Spiegel <richard.spiegel@amd.corp-partner.google.com> | 2018-11-30 10:53:40 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-12-05 14:05:23 +0000 |
commit | 6a9e6cd89e2be6b35675ee81c2272a5ea5f2db75 (patch) | |
tree | 4bcf764753debbdcde977c3635761f5fcd2607ac /src/soc/amd/stoneyridge/northbridge.c | |
parent | c3a27dffe90b1f3021ed9f8beed531ad224dbc4f (diff) | |
download | coreboot-6a9e6cd89e2be6b35675ee81c2272a5ea5f2db75.tar.xz |
src/(device/lib/soc): Remove unused variables
When building grunt with flags set to detect variables that get a value but
then are unused, there are 5 instances that causes error (unused variable).
In most cases it's enough to simply remove the variable. Other instances,
is better to simply use the variables (one instance it's a return value, on
the other instance using the variables makes code more readable).
BUG=b:120260448
TEST=Build and boot grunt.
Change-Id: I0d00fb6a42db20afb34c76b9445a741a57096ead
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/29985
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge/northbridge.c')
-rw-r--r-- | src/soc/amd/stoneyridge/northbridge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 749eefe1b7..4a856a9fa2 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -232,9 +232,9 @@ static unsigned long agesa_write_acpi_tables(struct device *device, /* HEST */ current = ALIGN(current, 8); hest = (acpi_hest_t *)current; - acpi_write_hest((void *)current, acpi_fill_hest); + acpi_write_hest(hest, acpi_fill_hest); acpi_add_table(rsdp, (void *)current); - current += ((acpi_header_t *)current)->length; + current += hest->header.length; /* BERT */ if (IS_ENABLED(CONFIG_ACPI_BERT) && bert_errors_present()) { @@ -250,9 +250,9 @@ static unsigned long agesa_write_acpi_tables(struct device *device, } else { current = ALIGN(current, 8); bert = (acpi_bert_t *)current; - acpi_write_bert((void *)current, (uintptr_t)rgn, size); + acpi_write_bert(bert, (uintptr_t)rgn, size); acpi_add_table(rsdp, (void *)current); - current += ((acpi_header_t *)current)->length; + current += bert->header.length; } } |