[U-Boot,v2,02/10] tiny-printf: Add print_grouped_ull()
diff mbox series

Message ID 20191021232652.132164-3-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show
Series
  • bootstage: TPL and SPL improvements
Related show

Commit Message

Simon Glass Oct. 21, 2019, 11:26 p.m. UTC
This function is used in the bootstage report which may be trigged in TPL
or TPL. Add a very basic implication of this function so that it builds.
There is no attempt to get the formatting right, since this would add too
much code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 lib/tiny-printf.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stefan Roese Oct. 22, 2019, 12:42 p.m. UTC | #1
On 22.10.19 01:26, Simon Glass wrote:
> This function is used in the bootstage report which may be trigged in TPL
> or TPL. Add a very basic implication of this function so that it builds.
> There is no attempt to get the formatting right, since this would add too
> much code size.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None
> 
>   lib/tiny-printf.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
> index 632b4249142..430c3255bc5 100644
> --- a/lib/tiny-printf.c
> +++ b/lib/tiny-printf.c
> @@ -389,3 +389,9 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
>   
>   	return ret;
>   }
> +
> +void print_grouped_ull(unsigned long long int_val, int digits)
> +{
> +	/* Don't try to ptint the upper 32-bits */

s/ptint/print ?

> +	printf("%ld ", (ulong)int_val);
> +}
> 

Other than that:

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Simon Glass Oct. 29, 2019, 11:21 p.m. UTC | #2
On 22.10.19 01:26, Simon Glass wrote:
> This function is used in the bootstage report which may be trigged in TPL
> or TPL. Add a very basic implication of this function so that it builds.
> There is no attempt to get the formatting right, since this would add too
> much code size.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2: None
>
>   lib/tiny-printf.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
Applied to u-boot-dm, thanks!

Patch
diff mbox series

diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 632b4249142..430c3255bc5 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -389,3 +389,9 @@  int snprintf(char *buf, size_t size, const char *fmt, ...)
 
 	return ret;
 }
+
+void print_grouped_ull(unsigned long long int_val, int digits)
+{
+	/* Don't try to ptint the upper 32-bits */
+	printf("%ld ", (ulong)int_val);
+}