From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de
Subject: Re: [PATCH v2] display_options: print_size: Fix order overflow
Date: Fri, 23 Sep 2022 18:48:44 -0400 [thread overview]
Message-ID: <20220923224844.GQ3044094@bill-the-cat> (raw)
In-Reply-To: <20220912190227.20015-1-pali@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
On Mon, Sep 12, 2022 at 09:02:27PM +0200, Pali Rohár wrote:
> Function print_size() round size to the nearst value with one decimal
> fraction number. But in special cases also unit order may overflow.
>
> For example value 1073689396 is printed as "1024 MiB" and value 1073741824
> as "1 GiB".
>
> Fix this issue by detecting order overflow and increasing unit order.
> With this change also value 1073689396 is printed as "1 GiB".
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2022-09-23 22:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 9:37 [PATCH] display_options: print_size: Fix order overflow Pali Rohár
2022-09-12 13:34 ` Simon Glass
2022-09-12 18:56 ` Pali Rohár
2022-09-12 19:02 ` [PATCH v2] " Pali Rohár
2022-09-14 17:10 ` Simon Glass
2022-09-23 22:48 ` Tom Rini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220923224844.GQ3044094@bill-the-cat \
--to=trini@konsulko.com \
--cc=pali@kernel.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox