[PATCH] of: reserved_mem: Use proper binary prefix

Geert Uytterhoeven posted 1 patch 2 years, 6 months ago
drivers/of/of_reserved_mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] of: reserved_mem: Use proper binary prefix
Posted by Geert Uytterhoeven 2 years, 6 months ago
The printed reserved memory information uses the non-standard "K"
prefix, while all other printed values use proper binary prefixes.
Fix this by using "Ki" instead.

While at it, drop the superfluous spaces inside the parentheses, to
reduce printed line length.

Fixes: aeb9267eb6b1df99 ("of: reserved-mem: print out reserved-mem details during boot")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
K = Kelvin
k = kilo
Ki = kibi
---
 drivers/of/of_reserved_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 27de0d32145939e3..948efa9f99e3bc90 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -290,7 +290,7 @@ void __init fdt_init_reserved_mem(void)
 				bool reusable =
 					(of_get_flat_dt_prop(node, "reusable", NULL)) != NULL;
 
-				pr_info("%pa..%pa ( %lu KB ) %s %s %s\n",
+				pr_info("%pa..%pa (%lu KiB) %s %s %s\n",
 					&rmem->base, &end, (unsigned long)(rmem->size / SZ_1K),
 					nomap ? "nomap" : "map",
 					reusable ? "reusable" : "non-reusable",
-- 
2.34.1
Re: [PATCH] of: reserved_mem: Use proper binary prefix
Posted by Rob Herring 2 years, 6 months ago
On Thu, 16 Feb 2023 09:37:25 +0100, Geert Uytterhoeven wrote:
> The printed reserved memory information uses the non-standard "K"
> prefix, while all other printed values use proper binary prefixes.
> Fix this by using "Ki" instead.
> 
> While at it, drop the superfluous spaces inside the parentheses, to
> reduce printed line length.
> 
> Fixes: aeb9267eb6b1df99 ("of: reserved-mem: print out reserved-mem details during boot")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> K = Kelvin
> k = kilo
> Ki = kibi
> ---
>  drivers/of/of_reserved_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks!