[PATCH v3 6/7] x86: Add an indication of 32/64-bit to bdinfo

Simon Glass sjg at chromium.org
Fri May 1 05:59:26 CEST 2020


Hi Heinrich,

On Thu, 30 Apr 2020 at 21:39, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> Am May 1, 2020 3:21:44 AM UTC schrieb Simon Glass <sjg at chromium.org>:
> >It is useful to know what mode U-Boot is running in. Add a message at
> >the
> >end of the 'bdinfo' output.
> >
> >Signed-off-by: Simon Glass <sjg at chromium.org>
> >Suggested-by: Mark Kettenis <kettenis at openbsd.org>
> >---
> >
> >Changes in v3:
> >- Show bit width for all archs, use sizeof(void *)
> >
> >Changes in v2:
> >- Add a new patch to indicate 32/64-bit in bdinfo
> >
> > cmd/bdinfo.c | 20 ++++++++++++++++++++
> > 1 file changed, 20 insertions(+)
> >
> >diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> >index d6a7175b37..34de89eb6d 100644
> >--- a/cmd/bdinfo.c
> >+++ b/cmd/bdinfo.c
> >@@ -15,6 +15,11 @@
> >
> > DECLARE_GLOBAL_DATA_PTR;
> >
> >+__maybe_unused void print_cpu_word_size(void)
> >+{
> >+      printf("%-12s= %d-bit\n", "Build", (uint)sizeof(void *) * 8);
>
> %d and uint do not match. Please, use %u for unsigned int.

Yes I was thinking that but somehow managed to change one without the other.

Regards,
SImon


More information about the U-Boot mailing list