coreboot-kgpe-d16/src/soc
Julius Werner 7f0d3de251 rk3399: sdram: Remove obs_err variable to avoid uninitialized use
CB:50863 refactored the data_training() function to split out read gate
training into a separate function, but in the course of this forgot to
correctly initialize the local obs_err varible in the new function to 0.
This means that it will be used uninitialized, and when it happens to be
non-zero it makes the training process fail. Due to the convoluted
control flow in the function, it seems that GCC's static analyzer
couldn't pick up on this uninitialized use.

The whole variable is unnecessary anyway, all it's used for is to force
the function to return two lines below without doing anything with
side-effects in between. This patch removes the variable and simplifies
the code in all three training functions to avoid this uninitialized use
issue and make everything a bit more readable. (Also restore the
original pre-clang-format continuation line intendations for more
readability.)

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ia475d64c06f2ec1bf9295742d173ce66717b821c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51079
Reviewed-by: Moritz Fischer <moritzf@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-02-26 00:49:35 +00:00
..
amd soc/amd/cezanne/acpi: Use IO addresses for ACPI block 2021-02-25 23:42:05 +00:00
cavium cbfs: Simplify load/map API names, remove type arguments 2020-12-02 22:13:17 +00:00
example arch/x86: Move prologue to .init section 2021-01-07 11:02:03 +00:00
intel soc/intel/{skl,cnl}: Uniformize romstage.h whitespace 2021-02-25 10:06:34 +00:00
mediatek mb/google/asurada: Enable RTC for event log 2021-02-25 08:18:17 +00:00
nvidia src: Remove useless comments in "includes" lines 2021-02-04 10:18:49 +00:00
qualcomm memlayout: Store region sizes as separate symbols 2021-02-19 08:39:26 +00:00
rockchip rk3399: sdram: Remove obs_err variable to avoid uninitialized use 2021-02-26 00:49:35 +00:00
samsung src: Remove unused <boot_device.h> 2021-02-10 07:22:08 +00:00
sifive memlayout: Store region sizes as separate symbols 2021-02-19 08:39:26 +00:00
ti soc/ti/am335x/header.c: Add missing include 2021-02-03 08:55:15 +00:00
ucb