[PATCH v10 1/3] test: fix test/dm/regmap.c

Simon Glass sjg at chromium.org
Wed Apr 14 21:38:40 CEST 2021


On Sun, 11 Apr 2021 at 10:23, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> regmap_read() only fills the first two bytes of val. The last two bytes are
> random data from the stack. This means the test will fail randomly.
>
> For low endian systems we could simply initialize val to 0 and get correct
> results. But tests should not depend on endianness. So let's use a pointer
> conversion instead.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v10:
>         new patch
> ---
>  test/dm/regmap.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list