summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_reserved_mem.c
diff options
context:
space:
mode:
authorVincent Whitchurch <vincent.whitchurch@axis.com>2022-06-28 13:35:40 +0200
committerRob Herring <robh@kernel.org>2022-06-28 22:15:36 +0200
commit6991cd744f068349a934fd31254c77f48fa530ec (patch)
treeca20d2219823bd6bf67500cb1ea972aeb3d19714 /drivers/of/of_reserved_mem.c
parentof: Drop duplicate 'the' in of_find_last_cache_level kerneldoc (diff)
downloadlinux-6991cd744f068349a934fd31254c77f48fa530ec.tar.xz
linux-6991cd744f068349a934fd31254c77f48fa530ec.zip
of: reserved-memory: Print allocation/reservation failures as error
If the allocation/reservation of reserved-memory fails, it is normally an error, so print it as an error so that it doesn't get hidden from the console due to the loglevel. Also make the allocation failure include the size just like the reservation failure. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220628113540.2790835-1-vincent.whitchurch@axis.com
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
-rw-r--r--drivers/of/of_reserved_mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 75caa6f5d36f..65f3b02a0e4e 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -156,7 +156,8 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
}
if (base == 0) {
- pr_info("failed to allocate memory for node '%s'\n", uname);
+ pr_err("failed to allocate memory for node '%s': size %lu MiB\n",
+ uname, (unsigned long)(size / SZ_1M));
return -ENOMEM;
}