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
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38786 )
Change subject: mb/pcengines/apu2: Remove unnecessary variable ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://review.coreboot.org/c/coreboot/+/38786/1/src/mainboard/pcengines/apu... File src/mainboard/pcengines/apu2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/38786/1/src/mainboard/pcengines/apu... PS1, Line 246: return mainboard_smbios_type16(agesa_dmi, handle, current) + handle incrementation by two must be done after the tables are assembled, not before, otherwise, the handle numbers in the tables will not conform to SMBIOS specification
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38786 )
Change subject: mb/pcengines/apu2: Remove unnecessary variable ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38786/1/src/mainboard/pcengines/apu... File src/mainboard/pcengines/apu2/mainboard.c:
https://review.coreboot.org/c/coreboot/+/38786/1/src/mainboard/pcengines/apu... PS1, Line 246: return mainboard_smbios_type16(agesa_dmi, handle, current) +
handle incrementation by two must be done after the tables are assembled, not before, otherwise, the […]
Thank you for the thorough review. I’ll abandon the change.
Paul Menzel has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/38786 )
Change subject: mb/pcengines/apu2: Remove unnecessary variable ......................................................................
Abandoned
Incorrect.