Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38786 )
Change subject: mb/pcengines/apu2: Remove unnecessary variable ......................................................................
mb/pcengines/apu2: Remove unnecessary variable
The initialization of the variable is not needed, but it turns out, we can just return the sum.
Change-Id: If0cba91f6ab642b0626d46fa01c9de9ca0c10a11 Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M src/mainboard/pcengines/apu2/mainboard.c 1 file changed, 3 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/38786/1
diff --git a/src/mainboard/pcengines/apu2/mainboard.c b/src/mainboard/pcengines/apu2/mainboard.c index bd2ca39..08d3b6f 100644 --- a/src/mainboard/pcengines/apu2/mainboard.c +++ b/src/mainboard/pcengines/apu2/mainboard.c @@ -235,19 +235,16 @@ unsigned long *current) { DMI_INFO *agesa_dmi; - int len = 0;
agesa_dmi = agesawrapper_getlateinitptr(PICK_DMI);
if (!agesa_dmi) - return len; - - len += mainboard_smbios_type16(agesa_dmi, handle, current); - len += mainboard_smbios_type17(agesa_dmi, handle, current); + return 0;
*handle += 2;
- return len; + return mainboard_smbios_type16(agesa_dmi, handle, current) + + mainboard_smbios_type17(agesa_dmi, handle, current); } #endif