soc/intel/apollolake: Fix value stored to gnvs is never read

Clang Static Analyzer found version 8.0.0 gnvs is allocated, but
it is never used. Change sizeof(*gnvs) to sizeof(global_nvs_t)
while adding ACPI GNVS to CBMEM.

TEST=Built and boot up to kernel.

Change-Id: Ie9421af4a556d1d88183aa938ee2a124a10ab727
Signed-off-by: John Zhao <john.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
John Zhao 2019-05-20 16:10:16 -07:00 committed by Patrick Georgi
parent 6336ee6df9
commit 57448845ff
1 changed files with 1 additions and 3 deletions

View File

@ -389,8 +389,6 @@ static void set_sci_irq(void)
static void soc_init(void *data)
{
struct global_nvs_t *gnvs;
/* Snapshot the current GPIO IRQ polarities. FSP is setting a
* default policy that doesn't honor boards' requirements. */
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
@ -418,7 +416,7 @@ static void soc_init(void *data)
p2sb_unhide();
/* Allocate ACPI NVS in CBMEM */
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(struct global_nvs_t));
/* Set RAPL MSR for Package power limits*/
set_power_limits();